SUMIF criteria as formula?

megera716

Board Regular
Joined
Jan 3, 2013
Messages
140
Office Version
  1. 365
Platform
  1. Windows
I have a table of invoices. Within that table, I have a column with formula [Date]-DAY([Date])+1 to return a m/d/yyyy date that is the 1st day of the invoice month. Off to the side, I SUMIF if the value in that column equals the date in column R, but I was hoping to run this formula within the SUMIF to eliminate that extra column in the table, but I can't get it to work.

I've tried it like this:

Column RColumn S
DateAmount
10/1/2019=SUMIF(Table6[Date]-DAY(Table6[Date])+1),R2,Table6[Amount])
11/1/2019=SUMIF(Table6[Date]-DAY(Table6[Date])+1),R3,Table6[Amount])

<tbody>
</tbody>



And like this:
Column RColumn S
DateAmount
10/1/2019=SUMIF(Table6[Date],(Table6[Date]-DAY(Table6[Date]))+1)=R2,Table6[Amount])
11/1/2019=SUMIF(Table6[Date],(Table6[Date]-DAY(Table6[Date])+1))=R3,Table6[Amount])

<tbody>
</tbody>


No go both ways.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Ultimately, I just want to sum the invoice amounts if the invoice date is in the same month as the date in Column R so I'm also open to other approaches for accomplishing that. I realize I could do this with a Pivot but I don't want to because reasons ;).
 
Upvote 0
How about
=SUMIFS(Table6[Amount],Table6[Date],">="&R2,Table6[Date],"<"&EDATE(R2,1))
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,766
Messages
6,126,758
Members
449,336
Latest member
p17tootie

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