Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default validating references; how to recognize the #REF! condition

#REF!

How do you generally intercept/recognize cell reference errors? Is
there a function you can wrap another function inside

I want to leave a value of 0 whenever a #REF! would occur.

Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 7
Default validating references; how to recognize the #REF! condition

I'm hacking on this. This seems a little verbose and requires, I
think, that the formula execute twice. But what about this:

=if(iserror(_formula_here_), 0, _formula_here_)

If that is a good solution, then the next step is to bold that 0 so
that the user knows it artificial.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 96
Default validating references; how to recognize the #REF! condition

The most brute force method works simplest, but comes with the highest price
because EVERY formula you use it on must be run in total TWICE. The function
is IF(ISERROR() in Excel 2000-2003

=VLOOKUP(A1, AA1:AB100, 2, FALSE)

TO get the this formula to NOT error when the A1 value cannot be found, you
wrap it in an error check:

=IF(ISERROR(VLOOKUP(A1, AA1:AB100, 2, FALSE)), 0, VLOOKUP(A1, AA1:AB100, 2,
FALSE))

See how the formula has to run twice to get a value? In Excel 2007 you can
use IFERROR()

=IFERROR(VLOOKUP(A1, AA1:AB100, 2, FALSE), 0)

==========
Other formulas offer the chance to errorcheck in a less brutal way. For
instance #DIV/0 errors, you can simply check the divisor cell for a value
before running the formula in total.

=A1/B1 becomes
=IF(B1=0, 0, A1/B1)

So, it really depends on the formula you're getting the error in to
determine the best method to error check.



--
"Actually, I *am* a rocket scientist." -- JB
(www.MadRocketScientist.com)

Your feedback is appreciated, click YES if this post helped you.


"okey" wrote:

#REF!

How do you generally intercept/recognize cell reference errors? Is
there a function you can wrap another function inside

I want to leave a value of 0 whenever a #REF! would occur.

Thank you.
.

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
Validating a Not Equal To Condition Mike Josephson New Users to Excel 3 July 1st 09 03:29 AM
validating Philashley Excel Discussion (Misc queries) 2 March 13th 08 03:54 PM
Help with converting a block of cells with Absolute and mixed references to relative references Vulcan Excel Worksheet Functions 3 December 13th 07 11:43 PM
validating Ayesha Excel Worksheet Functions 2 April 26th 06 02:56 PM
Validating Sdbenn90 Excel Discussion (Misc queries) 0 March 27th 06 12:05 AM


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

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"