Hi
Sorry for the earlier post, but hope this is following the roules!
Where do I change the range in this VBA code? The range hase to be E14:G214 as below but it's not working.
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Intersect(Target, Range("E14:G214")) Is Nothing Then
With Target
Select Case .Column
Case 1
If IsDate(.Cells) And IsNumeric(.Offset(0, 2)) And Not IsEmpty(.Offset(0, 2)) Then
.Offset(0, 1).Value = .Value + .Offset(0, 2).Value
End If
Case 2
If IsDate(.Cells) And IsDate(.Offset(0, -1)) Then
.Offset(0, 1).Value = .Value - .Offset(0, -1).Value + 1
.Offset(0, 1).NumberFormat = "General"
End If
Case 3
If IsNumeric(.Cells) And IsDate(.Offset(0, -2)) And Not IsEmpty(.Cells) Then
.Offset(0, -1).Value = .Offset(0, -2).Value + .Value - 1
End If
End Select
End With
End If
Application.EnableEvents = True
End Sub
Bookmarks