Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,670
Default Sumproduct criteria

Is there a way to use Sumproduct for a range but exclude the calculation of
certain rows. In example below use =sumproduct(a2:a6*c2:e6) , but somehow
exclude where "criteria" is "y?"


A B C D E
1 Criteria Multiplier Jan Feb Mar
2 x 0.5 120 105 90
3 x 0.4 90 85 120
4 y 0.7 105 120 85
5 y 0.4 120 70 105
6 x 0.2 90 90 70

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

Try this...

=SUMPRODUCT(((A2:A6<"y")*B2:B6)*C2:E6)

--
Rick (MVP - Excel)


"Eric" wrote in message ...
Is there a way to use Sumproduct for a range but exclude the calculation of
certain rows. In example below use =sumproduct(a2:a6*c2:e6) , but somehow
exclude where "criteria" is "y?"


A B C D E
1 Criteria Multiplier Jan Feb Mar
2 x 0.5 120 105 90
3 x 0.4 90 85 120
4 y 0.7 105 120 85
5 y 0.4 120 70 105
6 x 0.2 90 90 70

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 747
Default Sumproduct criteria

=SUMPRODUCT((A2:B6="x")*(B2:B6*C2:E6))


On Dec 4, 12:59*am, Eric wrote:
Is there a way to use Sumproduct for a range but exclude the calculation of
certain rows. *In example below use =sumproduct(a2:a6*c2:e6) , but somehow
exclude where "criteria" is "y?"

* * * * A * * * B * * * C * * * D * * * E * * *
1 * * * Criteria * * * *Multiplier * * *Jan * * Feb * * Mar * *
2 * * * x * * * 0.5 * * 120 * * 105 * * 90 * * *
3 * * * x * * * 0.4 * * 90 * * *85 * * *120 * *
4 * * * y * * * 0.7 * * 105 * * 120 * * 85 * * *
5 * * * y * * * 0.4 * * 120 * * 70 * * *105 * *
6 * * * x * * * 0.2 * * 90 * * *90 * * *70 * * *

Thanks


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Sumproduct criteria

=SUMPRODUCT((B2:B6)*(C2:C6)*(A2:A6<"y"))

--
Gary''s Student - gsnu200817
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,670
Default Sumproduct criteria

Thanks. That worked perfectly.


"Gary''s Student" wrote:

=SUMPRODUCT((B2:B6)*(C2:C6)*(A2:A6<"y"))

--
Gary''s Student - gsnu200817



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Sumproduct criteria

Hi Gary,

What if some cells are blanks in the value coloumn or there are no value and
I don't want a return answer of #div ?

"Gary''s Student" wrote:

=SUMPRODUCT((B2:B6)*(C2:C6)*(A2:A6<"y"))

--
Gary''s Student - gsnu200817

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,696
Default Sumproduct criteria

=SUMPRODUCT(--(A2:A6<"Y"),B2:B6,C2:C6,D2:D6,E2:E6)

will get it for you.

"Eric" wrote:

Is there a way to use Sumproduct for a range but exclude the calculation of
certain rows. In example below use =sumproduct(a2:a6*c2:e6) , but somehow
exclude where "criteria" is "y?"


A B C D E
1 Criteria Multiplier Jan Feb Mar
2 x 0.5 120 105 90
3 x 0.4 90 85 120
4 y 0.7 105 120 85
5 y 0.4 120 70 105
6 x 0.2 90 90 70

Thanks

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
SUMPRODUCT using more than 2 criteria? Max Excel Worksheet Functions 0 August 17th 07 02:23 AM
SUMPRODUCT using more than 2 criteria? Max Excel Worksheet Functions 0 August 17th 07 01:45 AM
SUMPRODUCT - 2 Criteria Sam via OfficeKB.com Excel Worksheet Functions 23 February 10th 07 01:52 AM
SUMPRODUCT with 3 criteria Kierano Excel Discussion (Misc queries) 1 October 16th 06 05:16 PM
Sumproduct with two criteria Rob Excel Worksheet Functions 9 February 10th 06 03:15 AM


All times are GMT +1. The time now is 10:16 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"