Adding One Additional Argument to SUMIF

meppwc

Well-known Member
Joined
May 16, 2003
Messages
626
Office Version
  1. 365
Platform
  1. Windows
The formula below works correctly
=SUMIF(Consolidated!D:D,Table!A2,Consolidated!P:P)

Basically it is saying that if the value in cell A2 of the "Table" worksheet is found in column D of the "Consolidated" worksheet, then sum the values in column P of the "Consolidated" worksheet.
I would like to add one additional argument to the existing formula but I am having trouble determining the syntax. I want to sum records that meet the above criteria PLUS the record must fall in the month of April.

Column E of the "Consolidated" worksheet are dates (format: 4/26/2018 11:43:41 PM)
The additional argument is, if the month derived from column E is equal to April
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Marcelo
Here is what I tried............not sure if the syntax is correct or not...........but it returned #VALUE !
=SUMIFS(Consolidated!D:D,Consolidated!E:E,"MONTH(Consolidated!E:E)=4",Table!A2,Consolidated!P:P)
 
Upvote 0
No, this doesn't work

For example, to check if a date in E:E belongs to July 2018 you need two conditions, like:
E:E,">="&DATA(2018,7,1),E:E,"<="&EOMONTH(DATE(2018,7,1),0)

M.
 
Upvote 0
oops there is a typo in the expression above.
Should be
E:E,">="&DATE(2018,7,1),E:E,"<="&EOMONTH(DATE(2018,7,1),0)

M.
 
Upvote 0

Forum statistics

Threads
1,223,952
Messages
6,175,592
Members
452,653
Latest member
craigje92

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