Forum Discussion
ianwuk
May 26, 2019Iron Contributor
How to track when values change between columns?
Hello Everyone. If I have a table that looks like this: Requirement UI Designed Number of Days UX Designed Number of Days Tested Number of Days Released Number of Days Release ...
- May 26, 2019Hi ianwuk, Put the code behind Sheet1. Then change any cells in your sheet1. All changes will be written to sheet2. regards Bernd
Berndvbatanker
May 26, 2019Iron Contributor
Hi, one idea: Documentate changes automatically with help of Worksheet_change event.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lngRow As Long
With Sheet2
lngRow = .Cells(.Rows.Count, 1).End(xlUp).Row + 1
.Cells(lngRow , 1).Value = Date
.Cells(lngRow , 2).Value = Time
.Cells(lngRow , 3).Value = Target.Address
.Cells(lngRow , 4).Value = Target.Value
.Cells(lngRow , 5).Value = Environ("username")
.Cells(lngRow , 6).Value = Environ("computername")
End With
End Sub
Regards from germany
Bernd
http://www.vba-Tanker.com
- ianwukMay 26, 2019Iron ContributorThanks Bernd for taking the time to reply.
I'm not really familiar with VBA. I assume I just add the above code to the sheet? What would the end result be running this code?
Thanks.