Hi Everyone,
Hope everyone is well. Very new to this.
Currently struggling use the date and time stamp in my excel doc multiple times.
My current basic code only stamps the date and time in column B after I input text in column A.
However I also wish to add the same fucntion in other coloums e.g. if text was input in column G then H would have a time stamp.
Please can anyone assist.
Current code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
For i = 2 To 10000#
If Cells(i, "A").Value <> "" And Cells(i, "B") = "" Then
Cells(i, "B").Value = Date & " " & Time
Cells(i, "B").NumberFormat = "d/m/yyyy h:mm AM/PM"
End If
Next
Range("B:B").EntireColumn.AutoFit
End Sub
Hope everyone is well. Very new to this.
Currently struggling use the date and time stamp in my excel doc multiple times.
My current basic code only stamps the date and time in column B after I input text in column A.
However I also wish to add the same fucntion in other coloums e.g. if text was input in column G then H would have a time stamp.
Please can anyone assist.
Current code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
For i = 2 To 10000#
If Cells(i, "A").Value <> "" And Cells(i, "B") = "" Then
Cells(i, "B").Value = Date & " " & Time
Cells(i, "B").NumberFormat = "d/m/yyyy h:mm AM/PM"
End If
Next
Range("B:B").EntireColumn.AutoFit
End Sub