View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Names with If function

If there are only a "few" selections available from your drop down list then
you can use an IF formula like this:

A1 = drop down list

=IF(A1="Biff","BR-549",IF(A1="Joe","555-1212",IF(A1="Linda","123-4567","")))

If you have more than a "few" selections available then your best bet is to
create a 2 column table like this:

.........AA.............AB......
1.....Biff..........BR-549
2.....Joe..........555-1212
3.....Linda......123-4567

Then use a lookup formula like this:

=VLOOKUP(A1,AA1:AB3,2,0)

The list of names in column AA can also be the source of your drop down
list.

--
Biff
Microsoft Excel MVP


"Dgwood90" wrote in message
...
I have created a drop down list of names. I am now trying to create an IF
function, that when a certain name is selected from the drop down box, it
will populate with a phone number. I receive the #NAME error. Can I not
use
names with IF function?