Aug 29, 2006 #1 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,
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,
Aug 29, 2006 #2 KenPuls MIS Jun 30, 2006 85 CA 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 http://www.excelguru.ca Upvote 0 Downvote
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 http://www.excelguru.ca
Aug 29, 2006 Thread starter #3 shavon Programmer Jun 18, 2001 102 CA PerfeK!!! Thank you Upvote 0 Downvote
Aug 29, 2006 #4 KenPuls MIS Jun 30, 2006 85 CA You're welcome! Ken Puls, CMA http://www.excelguru.ca Upvote 0 Downvote