sum date help

MCB123x

New Member
Joined
Jun 29, 2020
Messages
38
Office Version
  1. 2007
Platform
  1. Windows
Hello. This is the formula. What I need it to also do is trigger when the new month rolls around. Right now it triggers when a date in entered into the B column, which is what I need but I also would like to see it trigger automatically. Can this be done? Thanks in advance.
=SUMIFS($D$16:$D$71, $B$16:$B$71, ">="&C5, $B$16:$B$71, "<="&EOMONTH(C5, 0)) + IF(SUMIFS($B$16:$B$71, $B$16:$B$71, ">="&C5, $B$16:$B$71, "<="&EOMONTH(C5, 0), $D$16:$D$71, "<>"&"") > 0, B11, 0)
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
When you say trigger, do you mean calculate?

If your worksheet is set to automatic the above SUMIFS will calculate on worksheet changes.

Formulas/Calculation Options / Automatic
 
Upvote 0
yes, i meant calculate.

If automatic is the default then thats what it is set to. Don't wanna change that for this one date sum. no worries. I'll just have to type the date manually
Thank you
 
Upvote 0
Maybe I'm confused. Great if the sheet is on Auto Calc, that is the default.

What date are you trying to programmatically have inputted?
 
Upvote 0
the cell C5 is a date cell set at (feb 1, 2024). when that date rolls around I need the formula to 'activate' pulling the value from B11 into the cell the formula sits in
 
Upvote 0
You can set the value on workbook Open. Go to "ThisWorkbook" and add this code it will change the date in cell C5

VBA Code:
Private Sub Workbook_Open()
    ChangeDateInProductionSheet
End Sub


Private Sub ChangeDateInProductionSheet()
    Sheet1.Range("C5") = Date
End Sub

if this is not what you are looking for, please post your worksheet.
 
Upvote 0
Solution

Forum statistics

Threads
1,215,097
Messages
6,123,076
Members
449,094
Latest member
mystic19

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