ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Match? (https://www.excelbanter.com/excel-worksheet-functions/216348-match.html)

[email protected]

Match?
 
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


Pete_UK

Match?
 
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


On Jan 13, 4:05*pm, wrote:
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



[email protected]

Match?
 
On Jan 13, 11:40*am, Pete_UK wrote:
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

On Jan 13, 4:05*pm, wrote:



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- Hide quoted text -


- 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.

Pete_UK

Match?
 
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

wrote in message
...


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.



[email protected]

Match?
 
On Jan 13, 12:45*pm, "Pete_UK" wrote:
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

wrote in message

...

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

Pete_UK

Match?
 
You're welcome, Mark - thanks for feeding back.

Pete

On Jan 13, 5:57*pm, wrote:

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

Mark



All times are GMT +1. The time now is 11:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com