thesilkster
Member
Hello i would like the date and time inserted into a cell the same as below,, the code below populates the date and time when cell "S" has data entered into it.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rInt As Range
Dim rCell As Range
Dim tCell As Range
Set rInt = Intersect(Target, Range("R:R"))
If Not rInt Is Nothing Then
For Each rCell In rInt
Set tCell = rCell.Offset(0, -1)
If IsEmpty(tCell) Then
tCell = Now
tCell.NumberFormat = "mmm d, yyyy hh:mm"
End If
Next
End If
End Sub
what i need is another code that populates cell "B" with the time and date when data is entered into cell C ,is this possible? and will it still work if i lock the colums R & B
any help is appreciated
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rInt As Range
Dim rCell As Range
Dim tCell As Range
Set rInt = Intersect(Target, Range("R:R"))
If Not rInt Is Nothing Then
For Each rCell In rInt
Set tCell = rCell.Offset(0, -1)
If IsEmpty(tCell) Then
tCell = Now
tCell.NumberFormat = "mmm d, yyyy hh:mm"
End If
Next
End If
End Sub
what i need is another code that populates cell "B" with the time and date when data is entered into cell C ,is this possible? and will it still work if i lock the colums R & B
any help is appreciated