Numeric string

R

RogM

Say i have a number 123.45 I want to use a = function to be able to return
the first 2 number from the right (45). When I use =right it returns the
first 2 numbers from the point (23). I think this is because =right is for
returning a text string and is not recognising the point, but is there a
feature to return a numeric string?
 
R

RagDyer

I'd like to see your exact formula, because with
123.45
in A1, and
=RIGHT(A1,2)
in B1, I get
45 returned in B1.

However, the 45 *is* text.

To get 45 returned as a number, simply use:

=--RIGHT(A1,2)

--

Regards,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

Say i have a number 123.45 I want to use a = function to be able to return
the first 2 number from the right (45). When I use =right it returns the
first 2 numbers from the point (23). I think this is because =right is for
returning a text string and is not recognising the point, but is there a
feature to return a numeric string?
 
R

Ron Rosenfeld

Say i have a number 123.45 I want to use a = function to be able to return
the first 2 number from the right (45). When I use =right it returns the
first 2 numbers from the point (23). I think this is because =right is for
returning a text string and is not recognising the point, but is there a
feature to return a numeric string?


=MOD(A1,1)*100


--ron
 
P

Philippe L. Balmanno

Omit the *100 e.g. =--MOD(A1,1) and you get 0.45

A clarification is needed. Are you asking to get the right 2 digits on the
left of the decimal?
 
P

Philippe L. Balmanno

If you are asking for the right 2 digits on the left of the decimal use
=--TRUNC(MOD(A1,100)) which will return 23.
 
R

Ron Rosenfeld

It doesn't do that for me. I get 45.

Isn't that what the OP wanted?

===================
Say i have a number 123.45 I want to use a = function to be able to return
the first 2 number from the right (45)
===================


--ron
 
P

Philippe L. Balmanno

Interpreting what the OP wanted, I find that Ron's post works with the two
digits but, Myrna's post saying that it only returns 45 leaves me to believe
she may have been looking for .45 instead. Then I thought what if she
wanted the last two digits on the left of the decimal (useless to me but
there I went).
 
R

Ron Rosenfeld

Interpreting what the OP wanted, I find that Ron's post works with the two
digits but, Myrna's post saying that it only returns 45 leaves me to believe
she may have been looking for .45 instead. Then I thought what if she
wanted the last two digits on the left of the decimal (useless to me but
there I went).

Well, I'm confused now, but I see that the OP posted that "it's sorted out" so
....


--ron
 
Top