Solved

error with Vlookup

Posted on 2014-09-08
4
140 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
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 the scrolling table in Microsoft Excel using the INDEX function.

910 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

22 Experts available now in Live!

Get 1:1 Help Now