Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Selecting cell above a #N/A

Hi

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

Thanks

leshik
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 280
Default Selecting cell above a #N/A

Application.WorksheetFunction.IsNA("A1") returns True/False

"leshik" wrote in message
...
Hi

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

Thanks

leshik



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Selecting cell above a #N/A

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
-----Original Message-----
Hi

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

Thanks

leshik
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 single cell selecting muliple cell Submit2s Excel Worksheet Functions 1 February 12th 09 04:52 PM
Selecting a cell entry based on cell validation selection Brutalius Excel Worksheet Functions 2 December 17th 08 03:44 AM
Transfer cell values to another cell by selecting button. Gryndar Excel Worksheet Functions 2 November 24th 08 02:21 AM
Selecting cell next to a value KimH Excel Programming 4 May 26th 04 02:48 PM
Selecting the first cell of a row Remko Campagne Excel Programming 3 January 5th 04 04:41 PM


All times are GMT +1. The time now is 11:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"