Match?

D

dadmdp

This seems that it should be simple, but i can't figure it out. any
help is appreciated.

Column A contains last name, first

Column B contains last name

I want Column C to indicate (maybe by inserting an X) any last names
in Col B that match a last name in col A
 
P

Pete_UK

You could do something like this in C2:

=IF(B2="","",IF(COUNTIF(A$2:A$25,B2&"*")>0,"X",""))

then copy this down to cover the names that you have in column B.

Note that because this uses wildcards, you will get matches with
entries like "J" in column B.

Hope this helps.

Pete
 
D

dadmdp

You could do something like this in C2:

=IF(B2="","",IF(COUNTIF(A$2:A$25,B2&"*")>0,"X",""))

then copy this down to cover the names that you have in column B.

Note that because this uses wildcards, you will get matches with
entries like "J" in column B.

Hope this helps.

Pete






- Show quoted text -

Thanks Pete. Using this, I only appear to be matching up with first
names. i.e. last name column = James, is being coded as a match
because there are some first names listed as James. this is fine,
however it's not locating any of the last names.
 
P

Pete_UK

You said that column A contains Last_name, First_name - are you now saying
that it contains the data as First_name, Last_name ? That is what you imply
in saying that it is only matching with first names. Try this variation of
the formula:

=IF(B2="","",IF(COUNTIF(A$2:A$25,"*"&B2)>0,"X",""))

Note that I've moved the wildcard character.

Hope this helps.

Pete



Thanks Pete. Using this, I only appear to be matching up with first
names. i.e. last name column = James, is being coded as a match
because there are some first names listed as James. this is fine,
however it's not locating any of the last names.
 
D

dadmdp

You said that column A contains Last_name, First_name - are you now saying
that it contains the data as First_name, Last_name ? That is what you imply
in saying that it is only matching with first names. Try this variation of
the formula:

=IF(B2="","",IF(COUNTIF(A$2:A$25,"*"&B2)>0,"X",""))

Note that I've moved the wildcard character.

Hope this helps.

Pete



Thanks Pete. Using this, I only appear to be matching up with first
names. i.e. last name column = James, is being coded as a match
because there are some first names listed as James. this is fine,
however it's not locating any of the last names.

Sorry Pete. This seems to work. I will test to make sure. Thanks for
your help - I really appreciate it.

Mark
 

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