ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sequentially adding a day to total (https://www.excelbanter.com/excel-discussion-misc-queries/241451-sequentially-adding-day-total.html)

badboy

Sequentially adding a day to total
 

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

badboy

Sequentially adding a day to total
 

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


Bernard Liengme[_3_]

Sequentially adding a day to total
 
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),SUMPRO DUCT(--(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 <
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"BadBoy" wrote in message
...

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




badboy

Sequentially adding a day to total
 
Bernard, you're the best man!

Thank you so much for your help :P

"Bernard Liengme" wrote:

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),SUMPRO DUCT(--(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 <
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"BadBoy" wrote in message
...

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






All times are GMT +1. The time now is 07:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com