Excel

Copper Contributor

In excel we have just two cells. Enter a value in cell #1 and it's value is then added to the current value in cell #2. Then cell #1 is zeroed out, and the value in Cell#2 remains as is... Now enter a new value in cell#1, which then updates the value in cell#2, and thus cell #1 is again zeroed out, and cell #2 has a new value which keeps accumulating (for positive numbers)...Is this possible to do in excel without creating (over time) a huge list of numbers.....??????

3 Replies

@Bruce_Pahnl 

Hello! You've posted your question in the Tech Community Discussion space, which is intended for discussion around the Tech Community website itself, not product questions. I'm moving your question to the Excel space - please post Excel questions here in the future. 

@Bruce_Pahnl 

Private Sub Worksheet_Change(ByVal Target As Range)

Dim rngBereich As Range

Set rngBereich = Range("A1")

If Not Application.Intersect(Target, rngBereich) Is Nothing Then

Target.Offset(1).Value = Target.Offset(1).Value + Target.Value
Target.Value = ""

End If

End Sub

Maybe with these lines of code. In the attached file you can enter a number in cell A1 and cell A2 is updated accordingly.

Thank you very much. Now to learn VBA. Be well.