Solved

Vlookup question

Posted on 2014-01-06
6
295 Views
Last Modified: 2014-01-06
I am trying to do a vlookup but when I complete the formula I get #ref.  My formula is as follows:
vlookup(i2,Tiers!$a$2:$a$282,3,true)

I know I won't get a result for all of my entries, which is why the next step will be to do an If statement, but I know there should be some entries with a value returned.  Any ideas?
0
Comment
Question by:Rrave26
  • 3
  • 2
6 Comments
 
LVL 19

Expert Comment

by:Ken Butters
ID: 39760557
your third paramter= '3'.

That means to use the 3rd column of your range.

But the range you specified only contains 1 column... column "a"..... Tiers!$a$2:$a$282

supposing that Tiers!$a$2:$a$282 contains the item you are trying to match on... change the 3rd parameter from a 3 to a 1.
0
 

Author Comment

by:Rrave26
ID: 39760676
Ok, so I changed my parameters but now I'm returnning incorrect results.  What am I missing here.  I am attaching my ws for your review.
TEST-IM-METRICS-TRACKING.xlsm
0
 
LVL 12

Accepted Solution

by:
Harry Lee earned 250 total points
ID: 39760735
Rrave26,

What do you mean by incorrect results?

There are 2 reasons why you may get wrong result. In you formula,
=VLOOKUP(I2,Tiers!A2:C282,3,TRUE)

You are stating you want to search for the closes result by having the ,TRUE at the back. To get absolute match, you should use ,False.

When you have it set to ,False, you will end up getting error like #N/A in pretty much all of them because your lookup value and your data table is different. Almost all of your lookup value has a space behind them making absolute matching fail.

To get the lookup accurate, you have to delete all the trailing space in column I on your IM Raw Data sheet. 2nd, change your formula from =VLOOKUP(I2,Tiers!A2:C282,3,TRUE) to =VLOOKUP(I2,Tiers!A2:C282,3,FALSE).

After than, you will still have a few #N/A because the lookup value is not in the Tiers sheet.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:Rrave26
ID: 39760776
What I mean by incorrect for example is on line 1 and 23 it returns a value of 1 when there isn't a match.  I have deleted all of the trailing spaces and there wasn't any changes.

What else am I missing?
0
 
LVL 12

Expert Comment

by:Harry Lee
ID: 39760808
Rrave26, that's what I mean by closes match by having the True at the end of your formula.

The True means Approximate Match, and False means Exact Match.

What happen is the vlookup is not able to find a match, and it will pick the 1 cell after the closes match.

Let say, you are looking for Home in your vlookup, and in the data table, you only have Homa, and Hello. It will retuen 20, which is the data of Hello, instead of telling you there is no match.

          A               B
1     Homa          10
2     Hello          20
3     Helper          30
4     Howe          40

If you use False at the end, in the above sample, it will return #n/a since there is no Home in your data list.
0
 

Author Closing Comment

by:Rrave26
ID: 39760829
I will have to have my lookup data cleaned up.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
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…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

757 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

20 Experts available now in Live!

Get 1:1 Help Now