View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid
 
Posts: n/a
Default Get different numbers to return text??

Curalice,
First of all there is a simpler way for the Col B formula:
="Case " & LEFT(A1,1)

But if you try to do it with IF, you will need nested IF's and not the
syntax you have:
=IF(LEFT(A1,1)="4", "CASE 4", IF(LEFT(A1,1)="3", "CASE 3",
IF(LEFT(A1,1)="2", "CASE 2", IF(LEFT(A1,1)="1", "CASE 1", "UNKNOWN
CASE"))))

For Col C I suggest a 2-column table, where the first column will have
the various numbers under consideration and second column will have the
case. You can then use VLOOKUP(). Assuming the table is in G1:H30
=VLOOKUP(A1, $G$1:$H$30, 2, FALSE).

You are not so clear re your Col C values so there might be a more
efficient way, but this one will certainly work.

HTH
Kostis Vezerides