View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default Names with If function

hi,
the only thing i see wrong with your formula is the names and phone numbers
are not enclosed in double quotes.
=IF(A10="Steve Smith","555-555-5555",IF(A10="John Adams","555-555-5555","")
text should always be enclosed in double quotes. and telephone number are
considered text. here is a formula i developed as a test.
=IF(B3="Bob",C4,IF(B3="cary",C5,IF(B3="jim",C6,IF( B3="lucy",C7,""))))
here i called the cell that had the phone number in it.
I used data validation for my drop down.

post back if you have problems.
regards
FSt1

"Dgwood90" wrote:

This is the formula I am using.
=IF(A10=Steve Smith,555-555-5555,IF(A10=John Adams,555-555-5555,"")). I am
using four names.

"FSt1" wrote:

hi
i think so. post your formula.

regards
FSt1

"Dgwood90" wrote:

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?