can I write a function that automatically changes over time

A

andyp

I would like to create a function that changes every month. For example in
month 1 the formula would be SUM(A1:A1), in month 2 it would be SUM(A1:A2),
in month 3 SUM(A1:A3), etc...

there is data in all cells starting at the first month, so I cannot just sum
the column.

Any suggestions?
 
G

Gary''s Student

Something like:

=SUM(INDIRECT("A1:A"&MONTH(TODAY())))

will provide the monthly adjustment on the range of the sum.
 
J

Jacob Skaria

Another one

=SUM(A1:OFFSET(A1,MONTH(TODAY())-1,0))

The above will give a sum of A1:A5 and will keep on changing wrt month.

If this post helps click Yes
 

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

Top