Monthly Goal Formula

nniedzielski

Well-known Member
Joined
Jan 8, 2016
Messages
598
Office Version
  1. 2019
Platform
  1. Windows
I have this formula

Excel Formula:
=SUM(IF(MONTH($P$4:$P$40)=MONTH($T4), $Q$4:$Q$40, 0))

It is looking at an implementation date in column P, and if it matches the Month in Column T, then it calculates the monthly savings in column Q. The issue is, I keep having to change the Range as I add rows monthly, right now it goes down to P40. If i set it to like P50 to give myself ten rows of play, the formula goes #N/A. How can i adjust this formula to where i dont have to keep tinkering with it?

As always, thank you so much!!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Can you show the formula entered and the sheet view like I did?
yes sir, here you go
Capture.PNG
 
Upvote 0
The problem is, is that it is comparing 1/31/2024 to 1/1/2024.

Try this
Excel Formula:
=SUMIFS($Q:$Q, $P:$P, ">=" & $T4, $P:$P, "<=" & $T4 + DAY(EOMONTH($T4,0) -1))
 
Upvote 0
ok, that works for January, but when i copied down to february, that formula ignored a 2/5 savings. not sure why
The problem is, is that it is comparing 1/31/2024 to 1/1/2024.

Try this
Excel Formula:
=SUMIFS($Q:$Q, $P:$P, ">=" & $T4, $P:$P, "<=" & $T4 + DAY(EOMONTH($T4,0) -1))
 
Upvote 0
ok, that works for January, but when i copied down to february, that formula ignored a 2/5 savings. not sure why
Hmm thats odd

I just updated mine and drug the formulas down and they worked fine
1713540925858.png

The formulas should be
Jan -
Excel Formula:
=SUMIFS($Q:$Q, $P:$P, ">="&$T4, $P:$P, "<="& $T4 + DAY(EOMONTH($T4,0)-1))

Feb -
Excel Formula:
=SUMIFS($Q:$Q, $P:$P, ">="&$T5, $P:$P, "<="& $T5 + DAY(EOMONTH($T5,0)-1))

Mar -
Excel Formula:
=SUMIFS($Q:$Q, $P:$P, ">="&$T6, $P:$P, "<="& $T6 + DAY(EOMONTH($T6,0)-1))

The $T# should go from 4 to 5 to 6 etc as it drags down.
 
Upvote 0
Hmm thats odd

I just updated mine and drug the formulas down and they worked fine
View attachment 110216
The formulas should be
Jan -
Excel Formula:
=SUMIFS($Q:$Q, $P:$P, ">="&$T4, $P:$P, "<="& $T4 + DAY(EOMONTH($T4,0)-1))

Feb -
Excel Formula:
=SUMIFS($Q:$Q, $P:$P, ">="&$T5, $P:$P, "<="& $T5 + DAY(EOMONTH($T5,0)-1))

Mar -
Excel Formula:
=SUMIFS($Q:$Q, $P:$P, ">="&$T6, $P:$P, "<="& $T6 + DAY(EOMONTH($T6,0)-1))

The $T# should go from 4 to 5 to 6 etc as it drags down.
I just retried the January and this time it grabbed a 2/5 date and added it on.
 
Upvote 0

Forum statistics

Threads
1,215,352
Messages
6,124,449
Members
449,160
Latest member
nikijon

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