Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel formula help

Status
Not open for further replies.

shavon

Programmer
Jun 18, 2001
102
CA
Hello:

I would like to write an excel formula that does the following.

=IF(A1="Admin","11099","") or(A1="Accounting","11025","") or (A1="Sales","11035","")

The OR condition doesn't work.

Any help would be greatly appreciated.

Thank you,



 
Hi,

You actually need to nest a few more IF functions, rather than use OR:

=IF(A1="Admin","11099",IF(A1="Accounting","11025",IF(A1="Sales","11035","") ))

You'd use OF if you had several departments that would lead to the same number:

=IF(OR(A1="Admin",A1="Accounting",A1="Sales"),11035,"")

HTH,

Ken Puls, CMA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top