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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

BuzzG

Board Regular
Joined
Sep 8, 2002
Messages
67
I need to sum the hours using 2 values for workcatagory - "H" and "W". Any thoughts?
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
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).
 

Scott R

Active Member
Joined
Feb 20, 2002
Messages
449
Office Version
  1. 365
Platform
  1. Windows
Try this:
=SUMPRODUCT((Employee=1001)*((WorkCategory="H")+(WorkCategory="W")),Hours)
 

Forum statistics

Threads
1,181,684
Messages
5,931,408
Members
436,788
Latest member
Oteez

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
Top