Ongoing YTD totals

Humble Newbie

New Member
Joined
Sep 8, 2005
Messages
42
Good afternoon!

Column A contains dates going back 5 years, from row 10 downwards, and column C contains numerical values for those dates. Dates are being added almost every day.

What I want to do is sum the values for the current year to date, whatever that happens to be i.e. when 2006 comes around Excel will know it's a new year and start subtotalling again.

Is this possible?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Can you use something like:

=If(Year(cell_ref)=Year(today()),do if true, do if false)
 

Humble Newbie

New Member
Joined
Sep 8, 2005
Messages
42
Hello NBVC, thank you for replying.

I don't really understand your formula I'm afraid!

If I want the subtotal for the current year, say in A1, do I just enter: =If(Year(A1)=Year(today()),do if true, do if false) ?

Sorry but I'm pretty inexperienced with all this.
 

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Hi,

I think for what you have told me in your initial post, something like this is what you need:

=SUM(IF(YEAR(A1:A100)=YEAR(TODAY()),C1:C100)),

Where A1:A100 contains the dates and C1:C100 contains the numbers. Adjust as necessary.

Note: To confirm the formula use CTRL+SHIFT+ENTER instead of just ENTER.

Hope this helps.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,052
Messages
5,835,148
Members
430,342
Latest member
Sailingexcel

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
Top