LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 17
Default IF-based SUMPRODUCT criteria

Hello, Great Oz..
Here's my formula:
=SUMPRODUCT(((IF($B$1="All
Offices",sheet2!$E$2:$E$500<0,sheet2!$E$2:$E$500= $B$1)))*(sheet2!$I$2:$I$500="type1")*(MONTH(sheet2 !$B$2:$B$500)=MONTH($D$1)),sheet2!$N$2:$N$500)

sheet1, where this formula is found, is a little window onto sheet 2 which
is a huge data table. Many cells on sheet1 use the value in sheet1:B1 along
with additional criteria in a sumproduct formula for their value. I have
sheet1!B1 set up as a drop down menu based on a list of the different
offices, sheet1!S1:S10.

I'm trying to set up an "All Offices" option, so instead of picking a single
office they can look at them all together. However, this seems to entail
changing the operator in the first argument of the sumproduct formula from =
to < or vice versa. Not sure how to accomplish this.

The closest I've come is the formula above, which doesn't error out, and
works when "All Offices" has been selected in B1, but returns 0 when a single
office is chosen, even when there should be a nonzero answer.

Also tried:
=SUMPRODUCT(((IF($B$1="All
Offices",sheet2!$E$2:$E$500<0,sheet2!$E$2:$E$500& "="&$B$1)))*(sheet2!$I$2:$I$500="type1")*(MONTH(sh eet2!$B$2:$B$500)=MONTH($D$1)),sheet2!$N$2:$N$500)

=SUMPRODUCT((sheet2!$E$2:$E$500(IF($B$1="All
Offices",<0,=$B$1)))*(sheet2!$I$2:$I$500="type1") *(MONTH(sheet2!$B$2:$B$500)=MONTH($D$1)),sheet2!$N $2:$N$500)

=SUMPRODUCT((sheet2!$E$2:$E$500=(IF($B$1="All
Offices",AND(S1:S10),$B$1)))*(sheet2!$I$2:$I$500=" type1")*(MONTH(sheet2!$B$2:$B$500)=MONTH($D$1)),sh eet2!$N$2:$N$500)
....returns VALUE error

=SUMPRODUCT((sheet2!$E$2:$E$500=(IF($B$1="All
Offices","AND(S1:S10)",$B$1)))*(sheet2!$I$2:$I$500 ="type1")*(MONTH(sheet2!$B$2:$B$500)=MONTH($D$1)), sheet2!$N$2:$N$500)
....returns 0

=SUMPRODUCT((sheet2!$E$2:$E$500=(IF($B$1="All
Offices",(AND(S1:S10)),$B$1)))*(sheet2!$I$2:$I$500 ="type1")*(MONTH(sheet2!$B$2:$B$500)=MONTH($D$1)), sheet2!$N$2:$N$500)
....returns VALUE error

Any ideas?
thanks!
 
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
Lookup function based on 3 criteria staticx5151 Excel Discussion (Misc queries) 3 January 9th 07 12:01 AM
SUMPRODUCT, two criteria (date and product type) Bryce Excel Worksheet Functions 3 December 24th 06 04:14 AM
Counting and Suming based on multiple criteria Kev270 Excel Worksheet Functions 1 October 12th 06 02:55 PM
Calculating an average based on 2 and 3 criteria craggergirl Excel Worksheet Functions 2 February 24th 06 02:37 PM
Returning Results Based on Two Criteria [email protected] Excel Worksheet Functions 7 October 23rd 05 02:53 PM


All times are GMT +1. The time now is 04:13 PM.

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

About Us

"It's about Microsoft Excel"