Text to Numbers

  • Thread starter Thread starter Batshon
  • Start date Start date
B

Batshon

hi all,
Am trying to convert A, b, C (text) into 1,2,3
Can anybody help me in putting the right formula?
Cheers..
 
Hi,

There are several way but it depends upon what you are doing. For example
=IF(A1="a",1,IF(A1="b",2,IF(A1="c",3,4)))
is ok if you and have a few conditions but soon runs out of capacity if you
have lots.
Can you be a bit more precise about what you are doing.

Mike
 
Just another angle to your post ...

With single capital* letters (A,B,C ... ) assumed in A1 down
try this tinker in B1: =CODE(A1)-64
Copy down

*it's lower case single letters in A1 down
use in B1, copied down: =CODE(A1)-96
 
You can handle both upper and lower cases in one formula...

B1: =CODE(UPPER(A1))-64

Rick
 
One more............

With 1-26 in column D and a-z in column E

Enter in B1 =LOOKUP(A1,$D$1:$D$26,$E$1:$E$26)


Gord Dibben MS Excel MVP
 
Back
Top