I write a code that is supposed to check what is going on cell and act on the cells next to it (add or delete value). However, after run code is crushed on this: Target.Offset(, 1).Value = "". Anyone has an idea what's wrong?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
Dim lastRow As Long
lastRow = Cells(Rows.count, 5).End(xlUp).row
For i = 18 To lastRow
If Range("E" & i).Value = "TEXT" Then
Target.Offset(, 1).Value = ""
End If
Next i
End Sub