Show date when amend excel sheet
Closed
abc123
-
Apr 25, 2012 at 09:25 AM
Mehedad
Mehedad
- Posts
- 22
- Registration date
- Thursday April 19, 2012
- Status
- Member
- Last seen
- April 16, 2013
Related:
- Show date when amend excel sheet
- How to screenshot excel sheet - Guide
- How to copy data from one excel sheet to another - Guide
- Compare two excel sheets and highlight differences macro ✓ - Forum - Excel
- How to change language in excel sheet shortcut key - Guide
- Unit conversion excel sheet free download - Download
1 reply
Mehedad
Apr 26, 2012 at 05:53 AM
- Posts
- 22
- Registration date
- Thursday April 19, 2012
- Status
- Member
- Last seen
- April 16, 2013
Apr 26, 2012 at 05:53 AM
If you are entering data in Column A, The Date and TIME Stamp will be shown in Column C. You can either add a button and Assign a Macro or simply run this Macro to track the date of change.
Sub tryDateStamp()
Dim ColA, TestOut As Range
Set ColA = Range("A:A")
Set TestOut = Range("C:C")
itemCount = Range("A1").CurrentRegion.Rows.Count
For i = 2 To itemCount
If ColA.Cells(i, 1) <> "" And TestOut.Cells(i, 1) = "" Then
TestOut.Cells(i, 1).Value = Now
End If
Next i
End Sub
If you want to change the Range of input, the Range in the code needs to be changed.
Sub tryDateStamp()
Dim ColA, TestOut As Range
Set ColA = Range("A:A")
Set TestOut = Range("C:C")
itemCount = Range("A1").CurrentRegion.Rows.Count
For i = 2 To itemCount
If ColA.Cells(i, 1) <> "" And TestOut.Cells(i, 1) = "" Then
TestOut.Cells(i, 1).Value = Now
End If
Next i
End Sub
If you want to change the Range of input, the Range in the code needs to be changed.