Solved

IF Statement

Posted on 2013-12-16
2
209 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
ID: 39721813
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
ID: 39721879
Thanks Matt
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

832 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