Solved

IF Statement

Posted on 2013-12-16
2
223 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
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…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

751 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