I've gathered that Error 2042 is the VBA equivalent of #N/A. How do I check for this? I have a worksheet that has a number of formulas that occasionally return #N/A. These have been converted their text values, but I can't seem to get my VBA code to recognize this. I always get a type mismatch.
None of these work. How do I trap these values in an If statement without modifying all my worksheet formulas? I would like to avoid using something like worksheetfunction.isna
Code:
If cell.offset(0, 12) = "Error 2042" Then
...
If cell.offset(0, 12) = "" Then
...
If cell.offset(0, 12) = "#N/A" Then
...
None of these work. How do I trap these values in an If statement without modifying all my worksheet formulas? I would like to avoid using something like worksheetfunction.isna