Selecting cell above a #N/A

  • Thread starter Thread starter leshik
  • Start date Start date
L

leshik

Hi

How can I select a cell which resides above a cell
containing a #N/A, I have tried ISERROR without success.

Thanks

leshik
 
The Iserror should work, but you need to then offset the
cell back one row. Try the following replacing the
Activesheet.range("C5") with whatever range you are
checking. If you are looking for the #N/A only then you
need to check for returnval = error2042 and then offset.


Dim ReturnVal, MyCheck
ReturnVal = ActiveSheet.Range("C5")
MyCheck = IsError(ReturnVal) ' Returns True.
If MyCheck = True Then

ActiveCell.Offset(-1, 0).Select

Else

End If

Best of luck

DavidC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top