Display a digit before or after the decimal point in another cell

G

Guest

I want to be able to display the number that is so many spaces to the left
and right of the decimal point. Example: 1234.56 How do I put the
second digit to the left of the decimal point (number 3) in a different cell
in Excel? How do I put the first digit to the right of the decimal point
(number 5) in a different cell in Excel? What function would I use?
 
G

Guest

=(MOD(A1,10^3)-MOD(A1,10^2))/(10^2) will get you the digit three to the left.
Adjust all three exponents up/down by one to move one digit left/right.
 
B

Bernard Liengme

If number is in A1, the second digit to the left of the decimal is extracted
with =MOD(INT(A1/10),10)

If number is in A1, the first digit to the right of the decimal is extracted
with =INT(MOD(A1*10,10))
 
L

Linker IT Software

I want to be able to display the number that is so many spaces to the left
and right of the decimal point. Example: 1234.56 How do I put the
second digit to the left of the decimal point (number 3) in a different
cell
in Excel? How do I put the first digit to the right of the decimal point
(number 5) in a different cell in Excel? What function would I use?

I have created a set of additional worksheet functions in an addin called
litLIB. I am using the ToString and the ToInteger functions in my litLIB
addin and the MID Excel function together to display the third digit in your
number. I trust that printing the other numbers individually is easy to
achieve:

=ToInteger(MID(ToString(B3),3,1))

If you are interested in litLIB you can find it here:
www.oraxcel.com/projects/litlib

Gerrit-Jan Linker
Linker IT Software
www.oraxcel.com
 
G

Guest

This worked great. Thanks.

bpeltzer said:
=(MOD(A1,10^3)-MOD(A1,10^2))/(10^2) will get you the digit three to the left.
Adjust all three exponents up/down by one to move one digit left/right.
 
G

Guest

Bernard,

I am having difficulty adjusting the formula for the other digits. I have
been adjusting the "10" to "100" and to "1". What should I be doing?

Thanks,

Bob
 
G

Guest

Good morning,

When I tried the formula I got the #NAME? reponse. EXCEL changed the
formula to:

=ToiNTEGER(MID(tOsTRING(B3),3,1))

Thanks,

Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top