Sum multiple criteria in rows and across columns

mnedbal

New Member
Joined
Mar 31, 2015
Messages
2
I am looking to use either a formula or VBA script to sum values based on employee name, project and date range. The original table is below. I modified the original to copy the employee name in each row in order to do SUM (shown in light grey in the table). What I am after is summing a total value based on employee name, project name, and date range. The problem I am having is summing a horizontal date range. For example, I want the total number of hours for employee 1 who worked on project 2 between the months of Feb and Mar (8). I know how to use simple SUMIF array formulas but how can I capture the date range across columns?
Thanks,
Mike

Jan 14Feb 14Mar 14
Employee 1
Employee 1Project1050
Employee 1Project2126
Employee 1Project3000
Total Employee 1176
Employee 2
Employee 2Project1154
Employee 2Project2022
Employee 2Project3310
Total Employee 2486

<tbody>
</tbody>
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
With the help of Tony Valko, I found a solution:
=SUMPRODUCT((A2:A10=G2)*(B2:B10=H2)*(C1:E1>=I2)*(C1:E1<=J2)*C2:E10) where G2 is employee name, H2 is project name, I2 is start date, J2 is end date.

I am looking to use either a formula or VBA script to sum values based on employee name, project and date range. The original table is below. I modified the original to copy the employee name in each row in order to do SUM (shown in light grey in the table). What I am after is summing a total value based on employee name, project name, and date range. The problem I am having is summing a horizontal date range. For example, I want the total number of hours for employee 1 who worked on project 2 between the months of Feb and Mar (8). I know how to use simple SUMIF array formulas but how can I capture the date range across columns?
Thanks,
Mike

Jan 14Feb 14Mar 14
Employee 1
Employee 1Project1050
Employee 1Project2126
Employee 1Project3000
Total Employee 1176
Employee 2
Employee 2Project1154
Employee 2Project2022
Employee 2Project3310
Total Employee 2486

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,443
Messages
6,124,890
Members
449,194
Latest member
JayEggleton

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