cell conversions

K

kpruitt

I need to know how to make a spreadsheet work for what I need:

If in C2 I type SE3 or SE2 or SE1 and so forth, then I need E2 to = a number
that correlates to each of the SE3, SE2 or SE1.

Can anyone help?????????
 
B

Bernard Liengme

Do you want to extract the 1,2,or 3 from SE1,SE2,or SE3 ? then use
=--RIGHT(C2,1)
If there could be more than one digit (as in SE1234) then use
=--MID(C2,3,LEN(C2)-2)
The double negation in each formula is to convert text to number
best wishes
 
P

pinmaster

Hi

Depending on how many combination you have you can either use LOOKUP or
VLOOKUP, if you only have a few then a LOOKUP will do. Something like this:

=LOOKUP(C2,{"SE1","SE2","SE3","SE4"},{1,2,3,4})

note: SE1, SE2...etc must in ascending order

if on the other hand you a lot of combinations then VLOOKUP would be the
choice. You start by creating a talbe with the first column containing the
SE1, SE2...etc and the second column the assiciated numbers (1,2...etc in
this example) then the formula would look something like this:

=VLOOKUP(C2,your_table_range,2,0)


Hope this helps!
Jean-Guy
 
G

Gary''s Student

Try the IF statement in E2:

=IF(C2="SE3",57,IF(C2="SE2",37,IF(C2="SE1",99,"")))
 
Top