wayneryeven
Technical User
Hey all
I have a macro that looks at a cells contents then executes code based on that content:
If Range("V2") Like "Test*" Then
' Run Test Code
Else
' Do Nothing
End If
As you can see if the cell contains Test it will execute code otherwise it ignores it. Now it so happens that each cell in Column V is based on a lookup. The code is fine as long as V has a value. If it encounters an N/A error (lookup failed) then my code fails with a:
Run time error 13
Type mismatch
Anyone any ideas on how i could get round this? Unfortuantly column V will have to remain a lookup...
Many thanks, all suggestions welcomed.
I have a macro that looks at a cells contents then executes code based on that content:
If Range("V2") Like "Test*" Then
' Run Test Code
Else
' Do Nothing
End If
As you can see if the cell contains Test it will execute code otherwise it ignores it. Now it so happens that each cell in Column V is based on a lookup. The code is fine as long as V has a value. If it encounters an N/A error (lookup failed) then my code fails with a:
Run time error 13
Type mismatch
Anyone any ideas on how i could get round this? Unfortuantly column V will have to remain a lookup...
Many thanks, all suggestions welcomed.