lateraldesign
New Member
- Joined
- Dec 7, 2016
- Messages
- 1
Hi guys
I'm new to VBA and trying to set up a way in which an updated row in Excel (columns B to M) produces the date and time in rows O and P respectively. This all works absolutely fine with the code below. However I simply need to be able to do this from rows 6 upwards as there is other content in the first 5 rows not related to this and every time someone makes a change here the date and time and automatically entered.
How do I go about doing this?
I'm new to VBA and trying to set up a way in which an updated row in Excel (columns B to M) produces the date and time in rows O and P respectively. This all works absolutely fine with the code below. However I simply need to be able to do this from rows 6 upwards as there is other content in the first 5 rows not related to this and every time someone makes a change here the date and time and automatically entered.
How do I go about doing this?
Code:
Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Range("$B:$M"), Target) Is Nothing Then
Range("O" & Target.Row).Value = Date
Range("P" & Target.Row).Value = Now()
End If