# Cumulative Total By Month

• Hi,

I have a list of daily sales which I would like to have a cumulative total by month. Once the next month is encountered, the cumulative total will reset for that month again.

E.g. (please see attached file)
Column C is my cumulative total. The cumulative sum will reset when the month changes from Jan to Feb.

I can achieve the results using VBA but I need to distribute my report to parties whose VBA environment is disabled. So, I need to work around this with a formula.

Regards.

## Files

• Re: Cumulative Total By Month

=sumproduct(--(month(\$a\$2:a2)=month(a2)),--(year(\$a\$2:a2)=year(a2)),\$b\$2:b2)[hr]*[/hr] Auto Merged Post Until 24 Hrs Passes;[dl]*[/dl]ANother version

=SUMPRODUCT(--(\$A\$2:A2-DAY(\$A\$2:A2)=A2-DAY(A2)),\$B\$2:B2)

HTH

Bob

• Re: Cumulative Total By Month

Hi Bob,

Thank you. It was a nice one!

Regards.

• Re: Cumulative Total By Month

Hi Dave,

Would it be too troublesome for you to show me how can I achieve it with a pivot table?

Regards.

• Re: Cumulative Total By Month

Sure, attach some real data and I'll do so by this time tomorrow.

• Re: Cumulative Total By Month

Hi Dave,

As much as i would like to, I'm afriad I can't. I have to protect my company's interests.

Bob's solution worked just fine. (Thanks again, Bob!)

• Re: Cumulative Total By Month

From your firt example see attached with Pivot Table.
It can be adapted

## Files

Triumph without peril brings no glory: Just try

• Re: Cumulative Total By Month

Hi PCI,

Thank you. Got me curious where the field "month" came from but I guess that is another question to start a new thread.

Regards.

• Re: Cumulative Total By Month

The month field comes from:
select the date field
Right Clic
Select Group
Select Day and Month
"field" month will appear

Triumph without peril brings no glory: Just try

• Re: Cumulative Total By Month

Hi PCI,

Thank you very much!

## Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!