SUMIFS across multiple columns.

Brulcifer

New Member
Joined
Oct 14, 2019
Messages
1
I am looking to count the values of a certain column, based on various criteria across other columns. What I am currently using is:

=(sumifs('Workbook A'!$J:$J,'Workbook A'!$D:$D,$A3,'Workbook A'!$B:$B,">="&CP$1,'Workbook A'!$B:$B,"<="&CP$2)+sumifs('Workbook A'!$J:$J,'Workbook A'!$E:$E,$A3,'Workbook A'!$B:$B,">="&CP$1,'Workbook A'!$B:$B,"<="&CP$2)+sumifs('Workbook A'!$J:$J,'Workbook A'!$F:$F,$A3,'Workbook A'!$B:$B,">="&CP$1,'Workbook A'!$B:$B,"<="&CP$2))-(sumifs(CP$27:CP$33,$B$27:$B$33,$B3))

As you can see, it's the same formula 3x to search once in Column D, Column E, and Column F.

I am searching Workbook A for:
  • A name (which could appear in Columns D, E, or F)
  • That the name falls within a certain date (between CP1 and CP2)

Once I have that info, I am subtracting the total by other criteria I have elsewhere in Workbook B.

Example of Workbook A:


WeekdayDateEvent NameEmployee AEmployee BEmployee CClientStart TimeEnd TimeTOTAL HRS
Monday10/1Event 1MarkBob--1:00pm2:30pm1.5
Tuesday10/2Event 2
TinaMark
--​
1:30pm3:30pm2.0
Wednesday10/3Event 3RobertAdamStephen
--​
6:00pm7:30pm1.5
Thursday10/4Event 4
--​
7:00pm8:00pm1.0
Friday10/5Event 5MarkRobert
--​
8:20pm9:20pm1.0
Friday10/5Event 6MarkStephen
--​
2:00pm5:00pm3.0
Friday10/5Event 7AdamBillieMark
--​
12:00pm1:30pm1.5

<tbody>
</tbody>

<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
If you are after a more compact formula, here it is:

=SUM(SUMIFS('Workbook A'!$J:$J,OFFSET('Workbook A'!$D:$D,,{0,1,2}),$A3,'Workbook A'!$B:$B,">="&CP$1,'Workbook A'!$B:$B,"<="&CP$2))-(SUMIFS(CP$27:CP$33,$B$27:$B$33,$B3))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,581
Messages
6,114,466
Members
448,574
Latest member
bestresearch

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