Microsoft Excel formulas

Please help! I have one question : I have a several names in one column and I need that the letter A,B or C appear on the next column when I write this name. There's more than two variables.  (F.E.  in column A I have 3 names : James, Thomas, Nickolas and I need whenever I write name James on column C should appear a letter A. What formula should I use? If you understood this question it would be perfect.
Who is Participating?

Commented:
simple way:-

put this in  C1 and copy down:

=if(a1="James","A",if(a1="Thomas","B",if(A1="Nickolas","C")))

However if you have more names then you will have to add more If Statements and the maximum is 8. A more complete way to do it would be to have a list of names with a lookup - see attached file
nameref.xlsx
0

Hi Neznayka,

Try this=IF(A1="James","A",IF(A1="Thomas","B",IF(A1="Nikolash","C","")))

if need further clarification....let me know.

Thanks
0

Commented:
Jinx :)
0

ooopppsss Mr.ragmigrant,

i seen your comment after posting....  :)

Thanks
0

Jinx :)

Even this too  ;)
0

How bat this shorter one  =IF(A1={"James","Thomas","Nikolash"},{"A","B","C"},"")
0

Commented:
If you make a little table, you will find it easier to maintain your formulas. You can then use a VLOOKUP formula like:
=VLOOKUP(A1,LookupTable,2,FALSE)

James             A
Thomas         B
Nickolas         C

I used a dynamic named range LookupTable (instead of a fixed address like \$Y\$2:\$Z\$4) to refer to the little table so you can add people to the table without needing to change your formulas. Using the Formulas...Name Manager menu item, hit the New button then add a name like LookupTable with a Refers to formula like:
=\$Y\$2;INDEX(\$Z\$2:\$Z\$100,COUNTA(\$Y\$2:\$Y\$100))
LookupTableQ28411542.xlsx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.