Solved

IF Statement

Posted on 2013-12-16
2
191 Views
Last Modified: 2013-12-16
Is it possible to make my IF statement return a 0 instead of N/A where I am using several IF statements?

=IF(E9=8455,VLOOKUP(Sheet1!G9,'8455'!A:B,2,0),IF(E9=8456,VLOOKUP(Sheet1!G9,'8456'!A:B,2,0),IF(E9=8457,VLOOKUP(Sheet1!G9,'8457'!A:B,2,0))))

Thanks
0
Comment
Question by:Jagwarman
2 Comments
 
LVL 35

Accepted Solution

by:
mvidas earned 500 total points
Comment Utility
You could wrap it in an IFERROR function, and put zero in the argument for it.

=IFERROR(IF(E9=8455,VLOOKUP(Sheet1!G9,'8455'!A:B,2,0),IF(E9=8456,VLOOKUP(Sheet1!G9,'8456'!A:B,2,0),IF(E9=8457,VLOOKUP(Sheet1!G9,'8457'!A:B,2,0)))),0)

That will work in newer versions of excel. If you have an older one, you could use =IF(ISERROR(IF(E9=8455,VLOOKUP(Sheet1!G9,'8455'!A:B,2,0),IF(E9=8456,VLOOKUP(Sheet1!G9,'8456'!A:B,2,0),IF(E9=8457,VLOOKUP(Sheet1!G9,'8457'!A:B,2,0))))),0,IF(E9=8455,VLOOKUP(Sheet1!G9,'8455'!A:B,2,0),IF(E9=8456,VLOOKUP(Sheet1!G9,'8456'!A:B,2,0),IF(E9=8457,VLOOKUP(Sheet1!G9,'8457'!A:B,2,0)))))

Matt
0
 

Author Comment

by:Jagwarman
Comment Utility
Thanks Matt
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

728 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

15 Experts available now in Live!

Get 1:1 Help Now