I'm getting a run-time error '13' (type mismatch) for the following code and I can't figure out why. It was working before I added the "and" and the second condition. The first (a, 43) value is an error reading as "#N/A". Any ideas?
If IsNumeric(Sheets("Reuters").Cells(a, 43).Value) = True And _
Abs(Sheets("Reuters").Cells(a, 43).Value) >= 0.0799 Then
pfl = "P"
ct = ct + 1
Else
pfl = Empty
End If
Andin VBA doesn't "short circuit" - even if the first expression evaluates to False, the second expression will still be evaluated. So even if yourIsNumeric()reportsFalse, it will still try to run theAbs()part. - Tim Williams