1

I am using =IF(VLOOKUP(A2;$B$2:$B$11;B2;FALSE); TRUE; FALSE) to lookup a value in the column A.

enter image description here

As you can see my formula does not seem valid. Any suggestions why this is the case?

I appreciate your answer!

UPDATE

I am currently getting with =ISNUMBER(VLOOKUP(A2;$B$2:$B$11;1;FALSE)) only FALSE values. However I want to see True if there is a match:

enter image description here

Update

Using =Not(ISNA(VLOOKUP(A2;$B$2:$B$11;1;FALSE))) and =ISNUMBER(MATCH(A2, $B$2:$B$11, 0)) gives me the same result:

enter image description here

user2051347
  • 1,609
  • 4
  • 23
  • 34

2 Answers2

2

VLOOKUP takes the following arguments:

=VLOOKUP(lookup_value; table_array; col_index_num; [range_lookup])

lookup_value is what will be looked for in the first column of table_array.

table_array is the table in which the lookup_value and the value to be returned are.

col_index_num is the number indicating the nth column within table_array from which the value is to be returned from.

[range_lookup] (defaults to true) indicates the type of lookup, true being approximate and false being exact.

As such, if you want to find if A2 is in table $B$2:$B$11, you need to use a col_index_num of 1.

A simpler formula however would be with MATCH:

=ISNUMBER(MATCH(A2; $B$2:$B$11; 0))

MATCH returns the relative row number in which the value A2 is found. If there is a match, you get a number and hence ISNUMBER returns TRUE.


If you want to check if a value from column B exists in column A, then you have it reversed in the formula you used. Turning it around gives:

=ISNUMBER(MATCH(B2; $A$2:$A$11; 0))
Jerry
  • 70,495
  • 13
  • 100
  • 144
  • Thx for your answer! Please have a look at my update, because I do not get the derised results... – user2051347 Feb 15 '14 at 12:10
  • @user2051347 Are you sure you used the formula I suggested? :) – Jerry Feb 15 '14 at 12:11
  • Yep I am using `exactly` `=ISNUMBER(MATCH(A2, $B$2:$B$11, 0))` However I receive in the first col `FALSE` and then all over `TRUE's`. – user2051347 Feb 15 '14 at 12:13
  • 1
    @user2051347 I just checked your 'Expected Result' column and there is a `b` and a `d` in column B there. – Jerry Feb 15 '14 at 12:16
  • 1
    @user2051347 OR: are you checking if a value in column B exists in column A? That's a different thing. – Jerry Feb 15 '14 at 12:16
1

You could also use COUNTIF, i.e. this formula in C2 copied down

=COUNTIF(A$2:A$11,B2)>0

barry houdini
  • 45,615
  • 8
  • 63
  • 81