SUMIFS formula on multiple criteria

Nlambert

New Member
Joined
Apr 12, 2017
Messages
11
I am trying to find a way to sum a range of values based upon multiple criteria. Primarily I need to sum all of the hours worked from a raw report based on an employee name, contract number, and the month worked into a second worksheet within the same workbook.

I have created "helper" cells to try and make it easier, but any time I try to return a result based upon a SUMIFS formula, the result is always 0. What am I doing wrong?

I've attached a sample image as I cannot download on my work PC. Actuals Raw = raw report (with helper added). Actuals Working (where I want the calculations to occur, pulling data from the Raw worksheet)
 

Attachments

  • Actuals-Raw.PNG
    Actuals-Raw.PNG
    33.4 KB · Views: 23
  • Actuals-Working.PNG
    Actuals-Working.PNG
    28.4 KB · Views: 23

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Are the month names in the Working sheet proper dates formatted as month, or simply text strings?

You don't need the helper columns, just a valid formula. The basic syntax would be like this, you just need to replace the lower case descriptions with valid references in your Working sheet.
Excel Formula:
=SUMIFS(RAW!$E:$E,RAW!$A:$A,name,RAW!$C:$C,contract,RAW!$D:$D,">="&start of month, RAW!$D:$D,"<="&end of month)
 
Upvote 0
Most are, however I am having issues with the formatting of the date columns. I need it specifically to separate 2021 and 2022, however if I try to add a helper column that converts the date of 11/21/21 (for example) to Nov2021, it will force the cell to be a custom format. I haven't found a way around that just yet.
 
Upvote 0
Delete all of the helpers, they are absolutely useless for what you are doing.

Enter the date as 11/01/21 into what I believe is E5 of the Working sheet (currently shows Nov in bold). In F5, enter the formula =EDATE(E5,1) and drag right as far as O5. Apply a custom format of mmm to these dates.

Then enter this formula into E6 and use it to fill the table.
Excel Formula:
=SUMIFS(RAW!$E:$E,RAW!$A:$A,$A6,RAW!$C:$C,$B6,RAW!$D:$D,">="E$5, RAW!$D:$D,"<"&EOMONTH($E5,0))
 
Upvote 0
I've gotten the formatting to take, however I get an error when trying to either paste this formula or when i try to type it out. I've ensured that the reference cells are correct, formatting is on point, and the formula makes logical sense stepping through it. Any suggestions?

Note - I have not yet included the $ as I was trying to see if the formula would take first. I also had to remove the " " around the >= and < signs due to it not allowing me to select the reference date cell otherwise.
 

Attachments

  • error.PNG
    error.PNG
    29.7 KB · Views: 11
Last edited:
Upvote 0
Why do you want to do this through formulas? A pivot table can do the same and be quicker at it.
There are about 6 tabs on this sheet, and other worksheets reference these same cells and worksheets. These reports come out of our system and I am trying to avoid adding additional pivot tables that have to manually be added every time a new report is ran. My ultimate goal is to be able to paste in the new report and not have to touch it. There is another worksheet after this one that will reference this sheet for final data, once I have determined how to pull it.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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