L
Legacy 436357
Guest
Hello,
This code places history of changes to cell H44 starting in J3. Can this code be edited to also put the value of H3 starting in K3.
Thank you very much
This code places history of changes to cell H44 starting in J3. Can this code be edited to also put the value of H3 starting in K3.
Thank you very much
Excel Workbook | ||||
---|---|---|---|---|
J | K | |||
1 | Total Invoice History | |||
2 | Invoice Totals | Invoice Number | ||
3 | $ 140.00 | |||
4 | $ 660.00 | |||
5 | $ 130.00 | |||
Lookup Invoice |
Code:
Dim xVal As String
Private Sub Worksheet_Change(ByVal Target As Range)
Static xCount As Integer
Application.EnableEvents = False
If Target.Address = Range("H44").Address Then
Range("J3").Offset(xCount, 0).Value = xVal
xCount = xCount + 1
Else
If xVal <> Range("H44").Value Then
Range("J3").Offset(xCount, 0).Value = xVal
xCount = xCount + 1
End If
End If
Application.EnableEvents = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
xVal = Range("H44").Value
End Sub