compare contents of two adjacent columns

G

Guest

Hi,

I have two columns of text that I want to compare.

I need to see whether any of the values in column A are missing from column B.

EG:

A B C

ab4 ah6 no match
ab5 zqv no match
abs abs match
abv abv match

Hopefully it can give something like Column C as the result.

I have tried IF statements & functions such as Exact but cant get it to work.

Any help will be very much appreciated.

Many Thanks.
 
D

Dodo

I need to see whether any of the values in column A are missing from
column B.

EG:

A B C

ab4 ah6 no match
ab5 zqv no match
abs abs match
abv abv match

Pity it isn't your B-column that is sorted. You could then have used the
vlookup function.
Perhaps you can copy the B-column values to a different column, sort it
there and then do the lookup?
 
G

Guest

Thanks Gary, but I need to compare values in the whole of column B to the
specific ones in column A.

Eg Compare Cell A1 to any value in the whole of column B.
 
G

Guest

Thanks Dodo,

Yes I could sort column B, if I did how would I construct the lookup bearing
in mind I need to match specific values in column A to any in B ?
 
D

Dodo

Thanks Dodo,

Yes I could sort column B, if I did how would I construct the lookup
bearing in mind I need to match specific values in column A to any in
B ?

I'm supposing Row1 contains labels. Then in cell C2 I would put:

=IF(ISERROR(VLOOKUP(A2;B2:B5;1));"No match";"Match")

Copy this formula down column C.
 
D

Dodo

I'm supposing Row1 contains labels. Then in cell C2 I would put:

=IF(ISERROR(VLOOKUP(A2;B2:B5;1));"No match";"Match")

Copy this formula down column C.

Oops, forgot to fix the lookup range!

So, make the formula:

=IF(ISERROR(VLOOKUP(A2;$B$2:$B$5;1));"No match";"Match")

And set the range to the range you actually have before you copy the
formula down.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top