Sum MTD and YTD formulas

sachavez

Active Member
Joined
May 22, 2009
Messages
469
Excel 2010

Looking for some help on two formulas:

Sum MTD units
Sum YTD units

Column A contains dates
Column B contains units

Date data starts in cell A3
Unit data starts in cell B3

MTD formula will be in cell A1
YTD formula will be in cell B1

Data set grows daily, but it's at "table" so I ***think*** the formula would be dynamic?

Thanks in advance!

Steve
 
Try this:


Excel 2010
ABCD
1
2DateNumber
39/3/20133
410/3/20133
511/2/20134
611/22/20132
71/1/201411
81/31/20145
93/2/20145
104/1/20148
115/1/201411
125/31/20143
136/30/20141
147/30/20147
158/29/20145
169/28/20146
1710/28/20147
1811/27/20148
1912/27/201411
201/26/20157
2111/25/201510
22
23201520142013
24MTD004
25YTD76910
Sheet8
Cell Formulas
RangeFormula
B24=SUMPRODUCT(--(YEAR($A$3:$A$21)=B$23),--(MONTH($A$3:$A$21)=MONTH(TODAY())),--(DAY($A$3:$A$21)<=DAY(TODAY())),$B$3:$B$21)
B25=SUMPRODUCT(--(YEAR($A$3:$A$21)=B$23),--($A$3:$A$21<=DATE(B$23,MONTH(TODAY()),DAY(TODAY()))),$B$3:$B$21)
 
Upvote 0
Stellar! Produced the desired result. Much appreciate for the quick assist and smart formulas.

Steve

Try this:


Excel 2010
ABCD
1
2DateNumber
39/3/20133
410/3/20133
511/2/20134
611/22/20132
71/1/201411
81/31/20145
93/2/20145
104/1/20148
115/1/201411
125/31/20143
136/30/20141
147/30/20147
158/29/20145
169/28/20146
1710/28/20147
1811/27/20148
1912/27/201411
201/26/20157
2111/25/201510
22
23201520142013
24MTD004
25YTD76910
Sheet8
Cell Formulas
RangeFormula
B24=SUMPRODUCT(--(YEAR($A$3:$A$21)=B$23),--(MONTH($A$3:$A$21)=MONTH(TODAY())),--(DAY($A$3:$A$21)<=DAY(TODAY())),$B$3:$B$21)
B25=SUMPRODUCT(--(YEAR($A$3:$A$21)=B$23),--($A$3:$A$21<=DATE(B$23,MONTH(TODAY()),DAY(TODAY()))),$B$3:$B$21)
 
Upvote 0

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