Sumproduct

BuzzG

Board Regular
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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I need to sum the hours using 2 values for workcatagory - "H" and "W". Any thoughts?

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).

Thanks Aladin for tip. It works great!

Try this:
=SUMPRODUCT((Employee=1001)*((WorkCategory="H")+(WorkCategory="W")),Hours)

Scott, that method works also. Two great answers.
BuzzG

Replies
6
Views
334
Replies
18
Views
1K
Replies
3
Views
113
Replies
2
Views
138
Replies
5
Views
542

1,219,579
Messages
6,149,099
Members
450,859
Latest member
njaitley

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.

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

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