Aug 12 2020 09:07 PM
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 want cell a to go blank waiting for the next entry. So next i put 50 into cell a and then hit enter and have cell b show 100 while cell a goes blank again waiting for the next number. Any help would be really appreciated.
Aug 12 2020 09:53 PM
@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 Sub
Open the Visual Basic editor and copy this code into the worksheet area.
Aug 12 2020 10:22 PM
@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