Auto calc YTD Numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Cells A1:L1 equal "Jan" thru "Dec". M1 equals "YTD". Cells A2:L2 equal numeric values.

If you haven't guessed it already, I would like M2 to sum all the values A2:L2 for those months previous and including the current month (but not future months). What is the best way for going about this
 
Here are 2 ways

=SUM(OFFSET($A$2,,,,MATCH(TEXT(TODAY(),"mmm"),$A$1:$L$1,0)))

or

=SUM(OFFSET($A$2,,,,MONTH(TODAY())))

hopefully your computer's clock is accurate

--
For everyone's benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom


Carpie said:
Cells A1:L1 equal "Jan" thru "Dec". M1 equals "YTD". Cells A2:L2 equal numeric values.

If you haven't guessed it already, I would like M2 to sum all the values
A2:L2 for those months previous and including the current month (but not
future months). What is the best way for going about this?
 
Hi,

Here's another way,

=SUM(A2:INDEX(A2:L2,MATCH(TEXT(TODAY(),"mmm"),A1:L1,0)))

Hope this helps!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top