#1   Report Post  
Junior Member
 
Posts: 7
Default 3 criteria

I have the following formula for adding numbers that match two criteria that works fine
=SUMPRODUCT(--($E$125:$E$1084=AM4),--($AS$125:$AS$1084="yes"),$K$125:$K$1084)

I want to add a third criteria so I did this:
=SUMPRODUCT(--($E$125:$E$1084=AM4),--($E$125:$E$1084=AM34),--($AS$125:$AS$1084="yes"),$K$125:$K$1084)

and now the formula result is always 0

How can I add a third criteria to be checked before adding the matches in column K?

Thanks
MB
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default 3 criteria

Mike,

This part:

--($E$125:$E$1084=AM4),--($E$125:$E$1084=AM34)

means that the values in column E must be equal to two _both_ of different cells. If you want it to
be equal to _either_ of the two cells, then add those terms together together:

=SUMPRODUCT(((--($E$125:$E$1084=AM4))+(--($E$125:$E$1084=AM34))),--($AS$125:$AS$1084="yes"),$K$125:$K$1084)

HTH,
Bernie
MS Excel MVP


"Mike B" wrote in message
...

I have the following formula for adding numbers that match two criteria
that works fine
=SUMPRODUCT(--($E$125:$E$1084=AM4),--($AS$125:$AS$1084="yes"),$K$125:$K$1084)

I want to add a third criteria so I did this:
=SUMPRODUCT(--($E$125:$E$1084=AM4),--($E$125:$E$1084=AM34),--($AS$125:$AS$1084="yes"),$K$125:$K$1084)

and now the formula result is always 0

How can I add a third criteria to be checked before adding the matches
in column K?

Thanks
MB




--
Mike B



  #3   Report Post  
Junior Member
 
Posts: 7
Smile

Worked like a charm, thank you very much!





Quote:
Originally Posted by Bernie Deitrick
Mike,

This part:

--($E$125:$E$1084=AM4),--($E$125:$E$1084=AM34)

means that the values in column E must be equal to two _both_ of different cells. If you want it to
be equal to _either_ of the two cells, then add those terms together together:

=SUMPRODUCT(((--($E$125:$E$1084=AM4))+(--($E$125:$E$1084=AM34))),--($AS$125:$AS$1084="yes"),$K$125:$K$1084)

HTH,
Bernie
MS Excel MVP


"Mike B" wrote in message
...

I have the following formula for adding numbers that match two criteria
that works fine
=SUMPRODUCT(--($E$125:$E$1084=AM4),--($AS$125:$AS$1084="yes"),$K$125:$K$1084)

I want to add a third criteria so I did this:
=SUMPRODUCT(--($E$125:$E$1084=AM4),--($E$125:$E$1084=AM34),--($AS$125:$AS$1084="yes"),$K$125:$K$1084)

and now the formula result is always 0

How can I add a third criteria to be checked before adding the matches
in column K?

Thanks
MB




--
Mike B
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
Multple criteria dilemma Grant Reid Excel Worksheet Functions 9 July 13th 06 10:17 PM
DCOUNTA Complex Criteria Question Elliot Colbert Excel Worksheet Functions 5 June 19th 06 10:57 PM
Returning Results Based on Two Criteria [email protected] Excel Worksheet Functions 7 October 23rd 05 02:53 PM
sorting more than 3 keys Brooke Excel Discussion (Misc queries) 3 June 18th 05 04:52 AM
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 01:37 AM


All times are GMT +1. The time now is 11:31 AM.

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"