Solved

Remove NA error

Posted on 2011-03-14
5
291 Views
Last Modified: 2012-06-21
Hi,

I have the below formula which returns some NA errors, can i add to it so if its an NA error it returns blank for that cell

=IF(E8="8455",VLOOKUP(Fiscal_Merit!G11,'8455'!E:F,2,0),IF(E8="8456",VLOOKUP(Fiscal_Merit!G11,'8456'!E:F,2,0),IF(E8="8457",VLOOKUP(Fiscal_Merit!G11,'8457'!E:F,2,0))))

Thanks
Seamus
0
Comment
Question by:Seamus2626
5 Comments
 
LVL 6

Accepted Solution

by:
akajohn earned 167 total points
ID: 35129020
=IF(ISNA(IF(E8="8455",VLOOKUP(Fiscal_Merit!G11,'8455'!E:F,2,0),IF(E8="8456",VLOOKUP(Fiscal_Merit!G11,'8456'!E:F,2,0),IF(E8="8457",VLOOKUP(Fiscal_Merit!G11,'8457'!E:F,2,0))))),"",IF(E8="8455",VLOOKUP(Fiscal_Merit!G11,'8455'!E:F,2,0),IF(E8="8456",VLOOKUP(Fiscal_Merit!G11,'8456'!E:F,2,0),IF(E8="8457",VLOOKUP(Fiscal_Merit!G11,'8457'!E:F,2,0)))))


Should do it. Please post results here.
0
 
LVL 50

Assisted Solution

by:barry houdini
barry houdini earned 167 total points
ID: 35129060
Perhaps you could use INDIRECT to get the sheet name for a shorter formula....

=IF(ISNA(VLOOKUP(Fiscal_Merit!G11,INDIRECT("'"&Fiscal_Merit!G11&"'!E:F"),2,0)),"",VLOOKUP(Fiscal_Merit!G11,INDIRECT("'"&Fiscal_Merit!G11&"'!E:F"),2,0))

regards, barry
0
 
LVL 6

Assisted Solution

by:Russell Lucas
Russell Lucas earned 166 total points
ID: 35129063
You can wrap the whole thing in a IFERROR statment:-

=IFERROR(IF(E8="8455",VLOOKUP(Fiscal_Merit!G11,'8455'!E:F,2,0),IF(E8="8456",VLOOKUP(Fiscal_Merit!G11,'8456'!E:F,2,0),IF(E8="8457",VLOOKUP(Fiscal_Merit!G11,'8457'!E:F,2,0)))),"")

If the formula returns any errors it will give you a blank cell.
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 35129077
IFERROR is available in Excel 2007 and later so if you have that version you can apply Funinig Stroll's suggestion to mine to get

=IFERROR(VLOOKUP(Fiscal_Merit!G11,INDIRECT("'"&Fiscal_Merit!G11&"'!E:F"),2,0)),"")

barry
0
 

Author Closing Comment

by:Seamus2626
ID: 35129302
Cheers guys!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

759 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now