Ahh, row 503, the only row with a blank result and a flag level. Try:
Sub VarLoop()
Dim var As Variant
Dim rng As Range, x As Long
'On Error Resume Next
Set rng = Range("A2:K" & Range("A" & Rows.Count).End(xlUp).Row)
var = rng.Value
For x = LBound(var) To UBound(var)
If Not IsEmpty(var(x, 11)) Then 'to ignore blank flag levels.
If Not IsEmpty(var(x, 5)) Then 'to ignore blank results
If var(x, 3) = "Effluent" Or var(x, 3) = "Effluent Grab" Then
If InStr(var(x, 4), "Ammonia as N") Or InStr(var(x, 4), "CBOD 5") Or InStr(var(x, 4), "TSS") Or InStr(var(x, 4), "E coli IDEXX") Then
If CDbl(Replace(Replace(var(x, 5), "<", ""), ">", "")) > var(x, 11) Then 'CDbl to coerce strings to numbers
Range(Cells(x + 1, 1), Cells(x + 1, 11)).Interior.Color = vbYellow
End If
End If
End If
End If
End If
Next x
End Sub
I've added a commented-out line On Error Resume Next. If you get another error, try enabling this line and check the results.