G
Guest
I am using VBA to loop through a range and if the cell contains an Excel
generated "#NA" I want to skip executing the functions in the loop.
To test for the "NA" I have tried the following:
If ActiveCell.Offset(idx1, 0).Value <> "Error 2042" Then _
and
If ActiveCell.Offset(idx1, 0).Value <> "#NA" Then _
and both give a "Run-time error '13': Type mismatch".
How can I test for an Excel generated '#NA' in a cell?
TIA
Tim Kredlo
Exterior Wood, Inc
generated "#NA" I want to skip executing the functions in the loop.
To test for the "NA" I have tried the following:
If ActiveCell.Offset(idx1, 0).Value <> "Error 2042" Then _
and
If ActiveCell.Offset(idx1, 0).Value <> "#NA" Then _
and both give a "Run-time error '13': Type mismatch".
How can I test for an Excel generated '#NA' in a cell?
TIA
Tim Kredlo
Exterior Wood, Inc