Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Determining if a cell/range is in error?

Hello

Is there a simple way of determining if a cell/range is in error?

That is, able to tell if it's value is showing "#REF!" or "#NAME!" or
"#VALUE?".

I want to be able to ignore such cells with a universal test. Is this
possible?

Thanks in advance for any ideas,
Chrisso
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Determining if a cell/range is in error?

dim myCell as range
set mycell = activecell

if iserror(mycell.value) then
'it's some kind of error
else
'it's not an error
end if



Chrisso wrote:

Hello

Is there a simple way of determining if a cell/range is in error?

That is, able to tell if it's value is showing "#REF!" or "#NAME!" or
"#VALUE?".

I want to be able to ignore such cells with a universal test. Is this
possible?

Thanks in advance for any ideas,
Chrisso


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default Determining if a cell/range is in error?

Hi,


In addition to the VBA function IsError you have the spreadsheet functions:

=ISERROR(A1)
=ISERR(A1)
=ISNA(A1)

which can be employed in the VBE.

And you can use the Find Method or the Go To command to locate errors:

Selection.SpecialCells(xlCellTypeFormulas, 16).Select

It all depends on what you are trying to do.

Cheers,
Shane Devenshire
Microsoft Excel MVP

"Chrisso" wrote in message
...
Hello

Is there a simple way of determining if a cell/range is in error?

That is, able to tell if it's value is showing "#REF!" or "#NAME!" or
"#VALUE?".

I want to be able to ignore such cells with a universal test. Is this
possible?

Thanks in advance for any ideas,
Chrisso


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Determining if a cell/range is in error?

Ahhh - thanks to you both. Just what I needed.

Chrisso
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
Determining Cell within Range Pablo Excel Programming 1 February 27th 08 02:33 AM
Determining Range of selected cell [email protected] Excel Programming 2 December 5th 06 06:49 AM
Given a range of cells, some of which contain errors (e.g. #DIV/0), replace each cell having an error with the value of a non-error precedent cell Barclay0x00 Excel Programming 3 October 24th 05 05:12 PM
Determining range Sam Carleton Excel Programming 3 October 31st 03 11:55 PM


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