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 |
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 |
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 |
Determining if a cell/range is in error?
Ahhh - thanks to you both. Just what I needed.
Chrisso |
All times are GMT +1. The time now is 10:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com