VLOOKUP returning the same value which is "being looked for".

Copper Contributor

Started using VLOOKUP yesterday. Used it for the first time. Now when applying it to the following scenario, it's returning the same value as the result, which I am "looking for" in the other column. 

 

That is, I am trying to find the names (as listed in the second column), corresponding to the numbers in the last column. (first two column is the data which I already have at my disposal) and it is the last column, corresponding to which, I have to find the names, as listed in the second column.

 

Note: Taken only 3 rows of data, however, the data consists of 50 entries in the first 2 columns.

 

In the last column, I have 49 entries in all and I am supposed to look up the values of the last column, within the first column, and get the corresponding names from the second column.

 

Let's name the existing columns as A, B, C, D, E, F

 

I started appluing the Vlookup in C1, by placing the cursor in it, as follows:

 

=VLOOKUP(F1, A1:B50,1,0) (as it is already mentioned that A and B columns have 50 data points.

 

Result obtained in column C: I am getting the  corresponding values of column F itself,  in majority (matching with each other, wherever obtained), else NA.

 

when tried using without the excat match, that is without zero, it again produces the numbers in column c, as listed in column f, but this time producing even more absurd results, as there are no matches or corresponding values produced (as in the above case)

2658820821MBAW   1540217574
1540217574MBMS   2658820821
3514190626MBGAM   3514190626

 

3 Replies
Hi

So you have A1 to B50 and they are the codes and names

Then you have a list in column F that you need to lookup the names from that A1 : B50 List

So your lookup in C1 would be

=VLOOKUP( F1, $A$1:$B$50, 2, FALSE)

Does that give you what you need?


Hey @Wyn Hopkins , Thanks for replying, yes, it is giving the values, when I had put B50,2,0.................

 

However, initially, when I was using B50,1,0....it was just reproducing the values in column F.

 

Now, please help me with the logic behind putting B50,2,0 and not B50, 1,0.

 

 

Also, please note that I do not have any headers in the respective columns, hence, each of the columns start from first row itself, ie. A1, B1, F1.

 

 

Remark: To some extent I had just mugged up one way of applying Vlookup after seeing an example through Google, hence, not very sure about the logic behind B50,2,0 and not B50,1,0.

 

 

Regards,

exceluser

So VLOOKUP works by
a) referring to a value you want to lookup e.g. F1

b) and then referencing a range of data e.g. A1 to B50 where the frst column contains the values you are trying to match against with F1

c) then give it a column number that you want to return from the range of data. e.g. the name is in the 2nd column of the range A1:B50 so you type 2

d) type FALSE for an exact match, never use 1 or TRUE unless you know exactly why you are using them

I'd also suggest you look at learning INDEX MATCH which is more flexible and lacks some of the risks of using VLOOKUP

Here's a quick vidoe
https://accessanalytic.com.au/index-match/