Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Easy question: Have macro ignore #N/A


How do you ignore #n/A values with macros? Can I have it only look at
numbers? I just need a quick way to tell it to move along, and not
worry about the line with an #N/A value. TIA
Paul


--
Paul987
------------------------------------------------------------------------
Paul987's Profile: http://www.excelforum.com/member.php...o&userid=24850
View this thread: http://www.excelforum.com/showthread...hreadid=526860

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Easy question: Have macro ignore #N/A

If IsError(ActiveCell.Value) Then
MsgBox "error"
End If


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Paul987" wrote in
message ...

How do you ignore #n/A values with macros? Can I have it only look at
numbers? I just need a quick way to tell it to move along, and not
worry about the line with an #N/A value. TIA
Paul


--
Paul987
------------------------------------------------------------------------
Paul987's Profile:

http://www.excelforum.com/member.php...o&userid=24850
View this thread: http://www.excelforum.com/showthread...hreadid=526860



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Easy question: Have macro ignore #N/A

set rng = columns(1).Specialcells(Formulas,xlNumbers)
for each cell in rng

or

for each cell in selection
if not iserror(cell) then

end if
Next

--
Regards,
Tom Ogilvy


"Paul987" wrote:


How do you ignore #n/A values with macros? Can I have it only look at
numbers? I just need a quick way to tell it to move along, and not
worry about the line with an #N/A value. TIA
Paul


--
Paul987
------------------------------------------------------------------------
Paul987's Profile: http://www.excelforum.com/member.php...o&userid=24850
View this thread: http://www.excelforum.com/showthread...hreadid=526860


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
Easy Question - Please help martinbarnes Excel Discussion (Misc queries) 2 March 6th 08 04:34 PM
Ignore this question elyse Excel Discussion (Misc queries) 1 July 3rd 06 03:18 PM
new user with easy question? not easy for me speakeztruth New Users to Excel 5 June 3rd 05 09:40 PM
An easy macro question and one I believe to be a little more diffi TroutKing Excel Worksheet Functions 3 January 18th 05 09:17 PM
Easy question: macro to move cursor one to the right Sean Sydor Excel Programming 2 August 24th 03 04:26 AM


All times are GMT +1. The time now is 03:14 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"