Article ID: 280094 - Last Review: May 17, 2007 - Revision: 4.2 Sample user-defined function to hide formula errors in ExcelThis article was previously published under Q280094 On This PageSUMMARY Some formulas in Microsoft Excel return error values under
certain conditions. For example, when you use a division formula that
multiplies a number by zero, you receive the following error value:
#DIV/0!
Using the sample formula =100/0, you can work around this
behavior by hiding the error value. To do this, modify the formula as follows:
=IF(ISERROR(100/0),"",100/0)
Note The preceding formula works, but with longer formulas it can
become cumbersome.With the user-defined function that is provided in this article, the workaround formula is as follows:
=IFERROR(100/0,"")
MORE INFORMATIONMicrosoft provides programming examples for illustration only,
without warranty either expressed or implied. This includes, but is not limited
to, the implied warranties of merchantability or fitness for a particular
purpose. This article assumes that you are familiar with the programming
language that is being demonstrated and with the tools that are used to create
and to debug procedures. Microsoft support engineers can help explain the
functionality of a particular procedure, but they will not modify these
examples to provide added functionality or construct procedures to meet your
specific requirements.
How to create the sample function
212536
(http://support.microsoft.com/kb/212536/
)
How to run sample code from Knowledge Base articles in Office 2000
| Article Translations
|
Back to the top
