View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Multiple Conditions for IF statement to evaluate

=if(or(y2={25,19,61}),"Sedric",if(or(y2={8,4,31,33 }),"Fred",""))

But if you're going to have more than a couple of these categories, you may find
creating a table on a different sheet easier to update:

25 Sedric
19 Sedric
61 Sedric
8 Fred
4 Fred
....

then use a formula like:
=if(iserror(vlookup(y2,sheet2!a:b,2,0)),"",vlookup (y2,sheet2!a:b,2,0))

Debra Dalgleish explains it:
http://www.contextures.com/xlFunctions02.html (for =vlookup())

Bees*Stars wrote:

i have multiple branch numbers in one column. I want to do a pivot table
using an inserted column for financial planners. Is there a way to create a
conditional or any other usable statement in Excel along the following logic?

if cell y2 is one of (25,19,61), then "Sedric"
if cell y2 is one of (8,4,31,33), then "Fred","")

I am using Excel 2002.


--

Dave Peterson