CONVERT TEXT 2 NUMBERS

F

FARAZ QURESHI

I have used quite some scheme of formulas like left(), right() to extract the
"numbers" from a list of codes but they turn out to be in text form. Any idea
how to use some sort of =Text() like function so as to convert the extracted
figures to numbers?
 
K

Kevin B

Use the =VALUE(TextValue) to convert numbers appearing as text to their
numeric value. The example below converts the test string in A1 to a value:

=VALUE(A1)
 
M

Mike H

Hi,

With this in A1
q2q

=Mid(a1,2,1)
extracts the 2 and you can still do arithmatic on it

If you want it to right justify like a number multiply it by 1

=Mid(a1,2,1)*1

Mike
 
D

David Biddulph

The easy option is to use the double unary minus.

=LEFT(A2) gives text, but =--LEFT(A2) would give a number (providing, of
course, that the text was numerical).
 
P

Pete_UK

Yet another way is to add zero to the text value (as long as it is
purely made up of numbers):

=LEFT(A1,3)+0

Hope this helps.

Pete
 

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