Solved

error with Vlookup

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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
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…

831 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