C
Colin Hayes
Hi All
I use this code to place the current date (dd mmm yyyy) in a range of
cells when content is added to cells adjacent to them :
Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)
On Error GoTo enditall
Application.EnableEvents = False
If Intersect(Range(Target(1).Address), _
Range("B:B, D, F:F, H:H, J:J, L:L")) _
Is Nothing Then GoTo enditall
With Target
If .Value <> "" Then
With .Offset(0, -1)
.Value = Date + 1
'.Columns.AutoFit
End With
Else: .Offset(0, -1).Value = ""
End If
End With
enditall:
Application.EnableEvents = True
End Sub
Is it possible to have this place the next Tuesday's date (dd mmm yyyy)
in the cells , instead of the current date?
Can someone assist with an adaptation of the code?
Grateful for any advice.
I use this code to place the current date (dd mmm yyyy) in a range of
cells when content is added to cells adjacent to them :
Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Target As Range)
On Error GoTo enditall
Application.EnableEvents = False
If Intersect(Range(Target(1).Address), _
Range("B:B, D, F:F, H:H, J:J, L:L")) _
Is Nothing Then GoTo enditall
With Target
If .Value <> "" Then
With .Offset(0, -1)
.Value = Date + 1
'.Columns.AutoFit
End With
Else: .Offset(0, -1).Value = ""
End If
End With
enditall:
Application.EnableEvents = True
End Sub
Is it possible to have this place the next Tuesday's date (dd mmm yyyy)
in the cells , instead of the current date?
Can someone assist with an adaptation of the code?
Grateful for any advice.