erutherford
Active Member
- Joined
- Dec 19, 2016
- Messages
- 449
Trying to get 2 criteria to work in target.value scenario. Thought it would look like this, but nope "type mismatch" error. I know I can just write a separate one for "NA", but trying to learn to be efficient in writing code.
thanks for the look
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Not Intersect(Target, Range("B:B")) Is Nothing Then
If Target.Cells.Value = " " Or IsEmpty(Target) Then GoTo exitsub
'ok entries
'Jumps to Col.C - Estimate
If Target.Value = "ok" Or "NA" Then Target.Offset(0, 1).Value = "0"
'Jumps to Col J - Situation Code
If Target.Value = "ok" Or "NA" Then Target.Offset(0, 8).Value = "4"
'Auto drops to next row
If Target.Value = "ok" Or "NA" Then Target.Offset(1, 0).Select
'Moves cursor to Col.C
If Target.Value <> "ok" Or "NA" Then Target.Offset(0, 1).Select
End If
exitsub:
Application.EnableEvents = True
Worksheets("RptChklst").Columns("B:B").WrapText = True _
End Sub
thanks for the look