ItalianStallion4215
ItalianStallion4215

Reputation: 138

How do I keep a running tally in excel using a formula?

I am currently working on a project for work and need to have a counter/tally based on the number inputted in another cell, but I want that number to be retained and added to each time that number is changed.

(e.g. User enters 2 into cell E7, that 2 is then displayed in cell K5. Then the user clears E7 and enters 5. K5 should now display 7 since it retained the last value and is adding the new value to it.)

Upvotes: 1

Views: 3485

Answers (2)

ItalianStallion4215
ItalianStallion4215

Reputation: 138

Got it to work by doing VBA and I assigned it as a macro with a CTRL + shortcut. Works like a charm.

Sub Counter() Range("K5") = Range("K5") + Range("E6") End Sub

Upvotes: 2

John Burger
John Burger

Reputation: 3672

Sorry, but that's simply not possible with Excel. At best, you can only keep all of the previous values in rows, and add them up.

Upvotes: 0

Related Questions