I used the following vba code to add the date. it is seem to works probably , BUT if i protect the sheet I got the following error :
Run-Time error 1004
Unable to set the NumberFormat property of the Range class.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
For i = 4 To 100
If Cells(i, "B").Value <> "" And Cells(i, "G").Value = "" Then
Cells(i, "G").Value = Date & " " & Time
Cells(i, "G").NumberFormat = "M/D/yyyy h:mm AM/PM"
End If
If Cells(i, "K").Value <> "" And Cells(i, "N").Value = "" Then
Cells(i, "N").Value = Date & " " & Time
Cells(i, "N").NumberFormat = "M/D/yyyy h:mm AM/PM"
End If
If Cells(i, "V").Value <> "" And Cells(i, "X").Value = "" Then
Cells(i, "X").Value = Date & " " & Time
Cells(i, "X").NumberFormat = "M/D/yyyy h:mm AM/PM"
End If
Next
End Sub
Run-Time error 1004
Unable to set the NumberFormat property of the Range class.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
For i = 4 To 100
If Cells(i, "B").Value <> "" And Cells(i, "G").Value = "" Then
Cells(i, "G").Value = Date & " " & Time
Cells(i, "G").NumberFormat = "M/D/yyyy h:mm AM/PM"
End If
If Cells(i, "K").Value <> "" And Cells(i, "N").Value = "" Then
Cells(i, "N").Value = Date & " " & Time
Cells(i, "N").NumberFormat = "M/D/yyyy h:mm AM/PM"
End If
If Cells(i, "V").Value <> "" And Cells(i, "X").Value = "" Then
Cells(i, "X").Value = Date & " " & Time
Cells(i, "X").NumberFormat = "M/D/yyyy h:mm AM/PM"
End If
Next
End Sub