How do I add to this if statement to check for both NA values and cells with a "0" value.
Would I use IsNumber? If so, how?
With Sheets("Sheet1")
lr = Cells(Rows.Count, "D").End(xlUp).Row
For Each Cell In Range("D2:D" & lr)
If Application.WorksheetFunction.IsNA(Cell) Then
iViolations = iViolations + 1
End If
Next Cell
End With
Would I use IsNumber? If so, how?
With Sheets("Sheet1")
lr = Cells(Rows.Count, "D").End(xlUp).Row
For Each Cell In Range("D2:D" & lr)
If Application.WorksheetFunction.IsNA(Cell) Then
iViolations = iViolations + 1
End If
Next Cell
End With