This is my code
I want to add a code which will paste the values of I2 and/ or J2 in a the last available row in column A and B every time it changes( ie calculated)
In this case the first row available will be A3,B3 ( assuming that there is no B3 discussed below)
The value in B2 is going to be a live changing integer and there will be no B3(it is here to experiment).
Dim OldValue1
Private Sub Worksheet_Calculate()
If [B2] > OldValue1 Then
Application.EnableEvents = False
[I2] = [B2] - OldValue1
OldValue1 = [B2]
Application.EnableEvents = True
End If
If [B2] < OldValue1 Then
Application.EnableEvents = False
[J2] = [B2] - OldValue1
OldValue1 = [B2]
Application.EnableEvents = True
End If
End Sub
Bookmarks