View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Why doesn't this nested IF statement work?

=SUMPRODUCT(SUMIF(INDIRECT({"N8","P8","R8"}),"Apri l",INDIRECT({"M8","O8","Q8
"})))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Brandoni" wrote in message
...
I have six columns next to each other and am trying to add date based on

the
month in every other column.

M8 N8 O8 P8 Q8 R8
$200 April $100 May $100 April

Then trying to have the formula add any combination of M8,08 and Q8 that
have "April" next to them. So the formula checks to see if it should add

all
three, or two, or just one. In this example, the returned result should

be
$300.

I keep getting an error. Any help?


=IF(N8="April",IF(P8="April",IF(R8="April",(M8+O8+ Q8),if(N8="April",IF(P8="A
pril",(M8+O8),(IF(N8="April",IF(R8="April",((M8+Q8 ),IF(N8="April",M8,IF(P8="
April",o8,IF(R8="April",Q8,0),0),0),0),0),0),0),0) ,0),0),0),0)