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
Solved

error with Vlookup

Posted on 2014-09-08
4
142 Views
Last Modified: 2014-09-08
I am doing a VLookup with an IF an the result it is returning is True. What I am trying to dai is say

If R2 is = No Match Lookup AK2 in the range A:AB column 5 if found return the answer but if it's not there I want it to return Not Found

=ISERROR(IF(R154="No Match",VLOOKUP(AK154,X:AB,5,0),"Not Found"))

What am I doing wrong?

Thanks in advance
0
Comment
Question by:Jagwarman
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:helpfinder
ID: 40309806
but ISERROR formula evaluates value inside formula and gives you TRUE or FALSE.
what if you try just:
=IF(R154="No Match",VLOOKUP(AK154,X:AB,5,0),"Not Found")

or you can attach excel sample

PS: also could be:
=IF(R154="No Match",VLOOKUP(AK154,$X:$AB,5,0),"Not Found")
0
 

Author Comment

by:Jagwarman
ID: 40309855
helpfinder

That returns N/A
0
 
LVL 19

Accepted Solution

by:
helpfinder earned 500 total points
ID: 40309884
then it means in R154 is "No Match" and formula continues with true argument (VLOOKUP). VLOOKUP does not find match so returns N/A. This is how I see that formula and interprete your result.
If you want to have "Not Found" in case R154 is not "No Match" (this you have) and something else (e.g. "Nth found") if VLOOKUP does not find a match try to use this formula:
=iferror(IF(R154="No Match",VLOOKUP(AK154,X:AB,5,0),"Not Found"),"Nth found")
0
 

Author Comment

by:Jagwarman
ID: 40309920
I changed it to

=IFERROR(IF(R154="No Match",VLOOKUP(AK154,X:AB,5,0),""),"Not Found")

and it is exactly what I needed

Thanks
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
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…

839 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