Saturday, July 04, 2015

Running Total in Comment

Circular solution



You can't have a worksheet formula that looks like this:

=C3+C3

But you can do something similar if you use VBA and store the results in another location.

"In Microsoft Excel you can avoid circular references when you create a running total by storing the result in a non-calculating part of a worksheet. This article contains a sample Microsoft Visual Basic for Applications procedure that does this by storing a running total in a cell comment."

Microsoft Support:
Create a running total in a cell comment

The macro runs each time the value of a cell changes.
It adds the current value of the cell to the value of the cell comment. Then it stores the new total in the cell comment.

I'm sure someone can come up with other uses for this macro.



Also see:

Decision models.com:
Repetitive Calculation Features and Add-Ins

Daily Dose of Excel
Dick Kusleika
Circular References - The Good Kind



See all Topics

No comments: