Sumproduct

BuzzG

Board Regular
Joined
Sep 8, 2002
Messages
67
Is there a way to sum values with the sumproduct function that uses multiple criteria from one column. EX. =SUMPRODUCT((Employee=1001)*(Workcatagory="H")*Hours). I need to sum the hours with Workcatagory equal to "H" AND "W". I can't seem to get the right syntax. Is this possible in one formula
BuzzG
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
I need to sum the hours using 2 values for workcatagory - "H" and "W". Any thoughts?
 
Upvote 0
On 2002-09-20 13:16, BuzzG wrote:
Is there a way to sum values with the sumproduct function that uses multiple criteria from one column. EX. =SUMPRODUCT((Employee=1001)*(Workcatagory="H")*Hours). I need to sum the hours with Workcatagory equal to "H" AND "W". I can't seem to get the right syntax. Is this possible in one formula
BuzzG

=SUMPRODUCT((Employee=D1)*(Workcatagory=E1:F1)*Hours)

where D1 houses an employee number like 1001 and E1:F1 "H" and "W" (without double quotes).
 
Upvote 0
Try this:
=SUMPRODUCT((Employee=1001)*((WorkCategory="H")+(WorkCategory="W")),Hours)
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,465
Members
448,965
Latest member
grijken

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top