Forum Discussion
Peterpete_H
Aug 12, 2020Copper Contributor
Make a number in a cell auto dissapear
Hello all, I have tried to find an answer but cant, please help. What i cant work out is, I need to have two cells A and b, cell a i put 50 into and have cell b add it, once i hit enter i want i ...
Riny_van_Eekelen
Aug 12, 2020Platinum Contributor
Peterpete_H You need to put a piece of code in the worksheet where you want this automatic sum and clear to occur.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column = 1 Then
ThisRow = Target.Row
Range("B" & ThisRow).Value = Range("B" & ThisRow).Value + Range("A" &ThisRow).Value
Range("A" & ThisRow).Clear
End If
End SubOpen the Visual Basic editor and copy this code into the worksheet area.
- Peterpete_HAug 12, 2020Copper Contributor
Riny_van_EekelenThank you so very much am doing it now, i knew there had to be a way and im out of my depth but learning.
Thank you again, Peter
- Riny_van_EekelenAug 12, 2020Platinum Contributor
Peterpete_H You're welcome!