Solved

IF Statement

Posted on 2013-12-16
2
229 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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…
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…

626 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