Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Brandoni
 
Posts: n/a
Default Why doesn't this nested IF statement work?

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="April",(M8+O8),(IF(N8="Ap ril",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)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Miguel Zapico
 
Posts: n/a
Default Why doesn't this nested IF statement work?

You may use a simpler formula like:
=if(N8="April",M8,0)+if(P8="April",O8,0)+if(R8="Ap ril",Q8,0)

"Brandoni" wrote:

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="April",(M8+O8),(IF(N8="Ap ril",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)

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
 
Posts: n/a
Default Why doesn't this nested IF statement work?

Try this one:

=M8*(N8="April")+O8*(P8="April")+Q8*(R8="April")
The answer to your question is you probably have too many nested Ifs (only 7
are allowed.) A quick glance at it indicates you do.
--
Kevin Vaughn


"Brandoni" wrote:

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="April",(M8+O8),(IF(N8="Ap ril",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)

  #5   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)


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested SumIf statement jlhart76 Excel Worksheet Functions 7 January 18th 06 04:27 PM
Work book formulas Jessica Excel Discussion (Misc queries) 1 June 9th 05 10:51 AM
Do I need a sumif or sum of a vlookup formula? PeterB Excel Worksheet Functions 0 June 1st 05 12:23 PM
How to copy the work sheets from different workbooks into one? Sesh Excel Discussion (Misc queries) 1 April 15th 05 06:03 PM
Change Path names in copied work book jheaney Excel Worksheet Functions 2 November 18th 04 07:29 PM


All times are GMT +1. The time now is 06:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"