LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default testing for #NA with VBA

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
 
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
Testing Jay T. Emory[_2_] Excel Discussion (Misc queries) 0 February 18th 09 08:55 PM
TESTING Eamon Excel Worksheet Functions 0 July 11th 08 03:41 PM
Testing Richard Wrigley Excel Discussion (Misc queries) 0 November 1st 06 09:45 PM
Testing Tony Excel Discussion (Misc queries) 0 June 4th 05 05:39 PM
just testing John Excel Programming 1 August 30th 04 05:16 AM


All times are GMT +1. The time now is 08:07 AM.

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

About Us

"It's about Microsoft Excel"