Sequentially adding a day to total

B

BadBoy

A B C D E F G
H
4 | Month | J J A S O N
Year to date
5 | Heading | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 3.00
|

In the above example, the letters above the numbers identify the month.
(J-June J-July A-Aug S-Sept O-Oct N-Nov and the numbers are money)

I am looking for a formula that will add only the numbers in row 5 up to the
current month but not past that. So above, I wish it to add June, July and
Aug in this example.

At the end of August, I wish the formula to know that we are in September
now and Add the total from September to the previous months (Row 5, column
B,C and D)

This formula is for a calendar year.

Thank you in advance for your help.

-BadBoy
 
B

BadBoy

A B C D E F G H
4 |Month| J J A S O N YTD
5 |Heading|1.00|1.00|1.00|1.00|1.00|1.00| 3.00

In the above example, the letters above the numbers identify the month.
(J-June J-July A-Aug S-Sept O-Oct N-Nov and the numbers are money)

I am looking for a formula that will add only the numbers in row 5 up to the
current month but not past that. So above, I wish it to add June, July and
Aug in this example.

At the end of August, I wish the formula to know that we are in September
now and Add the total from September to the previous months (Row 5, column
B,C and D)

This formula is for a calendar year.

Thank you in advance for your help.

-BadBoy
 
B

Bernard Liengme

If your months go up to only December
=SUMPRODUCT(--(COLUMN(A5:G5)+5<=MONTH(A1)),A5:G5)

If you have a full year and the last month (May) money value is in L5
=IF(AND(MONTH(TODAY())>5,MONTH(TODAY())<12),SUMPRODUCT(--(COLUMN(A5:G5)+5<=MONTH(TODAY())),A5:G5),SUM(A5:G5)+SUMPRODUCT(--(COLUMN(H5:L5)-7<=MONTH(TODAY())),H5:L5))

Caveat: I have assumed that since today is Sept 2, you meant to add Sept
values
So I am summing months up to and including current month
If you need to sum only completed months so adjustment is needed: repalce =<
by <
 

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