I have some data that contains both numeric and string values
Name Code
Bob 1
Alice 2
Bob 33AL
Dan AFAL
Alert AL99
Bob ALP
I want to select names where the "Code" column contains "AL" somewhere.
If I do
If InStr(0, Cells(j, Code_column).Value, "AL", vbTextCompare) <> 0 Then
then my loop doesn't run because of the numeric values at some points in the column.
I have tried
If InStr(0, CStr(Cells(j, Code_column).Value), "AL", vbTextCompare) <> 0 Then
but I am getting the same error. What should I try? A pre-loop checking if it is numeric?