Solved

Simplest way to change what is displayed when an Excel formula results in an error

Posted on 2016-08-17
6
62 Views
Last Modified: 2016-08-18
Hello,

I seem to remember a simple and shorter way to define results when adding the Excel ISERROR() function to the beginning of a formula.

Can someone tell me if that's true, and if so, remind me what it is?

At the time this issue came to mind, I was using the following formula in a setting in which I knew that many of the cells would have errors (ie the presence of the errors is not the problem):

=VLOOKUP(VALUE(TRIM(SUBSTITUTE(S17,"G",""))),Table,2,0)

Open in new window

However, the error cells currently display #N/A and my desire is simply to display a more subtle indicator for error, namely, a backtick (`) (instead of the #N/A).

I came up with the following solution, and it does the trick (ie displays ` rather than #N/A in cells with errors) but its a bulkier and more cumbersome formula than what I remember:
=IF(ISERROR(
VLOOKUP(VALUE(TRIM(SUBSTITUTE(S17,"G",""))),Table,2,0)),"`",
VLOOKUP(VALUE(TRIM(SUBSTITUTE(S17,"G",""))),Table,2,0))

Open in new window

Is there a way to simplify that?

Thanks
0
Comment
Question by:WeThotUWasAToad
6 Comments
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 500 total points
ID: 41760414
Yep. Use IFERROR instead of ISERROR...

=IFERROR(VLOOKUP(VALUE(TRIM(SUBSTITUTE(S17,"G",""))),Table,2,0), "`")
1
 
LVL 30

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41760469
What excel version you are using?
If you are using 2007 or later, you may use the IFERROR function as suggested by Wayne.
0
 
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 41760474
Previous questions suggest they use XL 2010. And does anyone use XL 2003 anymore?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 30

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41760480
@Wayne
Are you asking me?
0
 
LVL 18

Expert Comment

by:Roy_Cox
ID: 41760577
Excel 2003 is still in use, but I don't often see examples now.

A universal solution could be to use Conditional Formatting to hide errors, read this

You can also use ISNA

= IF ( ISNA (your formula ) , " " , your formula )


Remember that errors can often be useful though, if they are hidden then the user may not be aware that an error is occurring.
0
 

Author Comment

by:WeThotUWasAToad
ID: 41761753
Yep. Use IFERROR instead of ISERROR...
"Yep" Wayne, that is exactly what I was after. I didn't recall that there was an "IF" and "IS" flavor so I was looking for something else. I'll never forget again though, after seeing them side-by-side. Many thanks.

What excel version you are using?
2010

You can also use ISNA
= IF ( ISNA (your formula ) , " " , your formula )
One of the great perks of a subscription to EE: learning about things you never before knew existed. Thanks Roy

_____________________________________________________
I worry about all the things I know I don't know,
but what really concerns me
are all the things I don't know
and don't even know I don't know them.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question