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?
 

Some videos you may like

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

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.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,285
Messages
5,571,310
Members
412,381
Latest member
RogerL
Top