Sooo.....this is a follow-on to a previous post. I'm trying to modify the below to:
- Round across H4:O, instead of Range("I2:I6000")
- Ignore any errors - the below give a #value error if text is entered, which is fine (in that workbook, lol)
VBA Code:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrTrap
Dim rng As Range
Set rng = Intersect(Target, Range("I2:I6000"))
If Not rng Is Nothing Then
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
If Len(Target) > 0 Then
Target.Value = Evaluate("ROUND(" & Target.Address & "/365,2)*365")
End If
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
End If
Exit Sub