+ Reply to Thread
Results 1 to 22 of 22

Formulas to see if names in one column exists on the names in the second column

  1. #1
    Registered User
    Join Date
    07-24-2014
    Location
    Atlanta, Georgia
    MS-Off Ver
    2007
    Posts
    15

    Formulas to see if names in one column exists on the names in the second column

    Hey everyone,

    I am at work and I need some help!
    I have two columns listing about 400 and 500 names respectively.
    First Column has names in alphabetical order and the second column is random.
    One column has names in this format: Last name, First name
    and the other column lists the names as first name and then last name without the comma
    I am trying to see if the list of names in one column exists in the other.

    Is there a way to see this without changing the format of the names in each column? If so do I have to erase the comma?

    Thanks in advance !

    Name Lists (1).xlsx
    Last edited by jkim204; 08-18-2014 at 03:29 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Formulas to see if names in one column exists on the names in the second column

    You get better help on your question, if you add an small excel file, without confidential information on this forum.

    Please also add the desired (expected) result in the file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,178

    Re: Formulas to see if names in one column exists on the names in the second column

    in LAST,FIRST field (here called col A),
    have one col (ex. Y) get the last name of A=left(a1,instr(a1,",")-1)
    then (ex Z) get first name, have the formula: = mid(a1,instr(a1,",")+1)

    in another check the the 2 first name colunns, and the two last names

  4. #4
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Formulas to see if names in one column exists on the names in the second column

    Untested, maybe something like this?

    =iferror(vlookup(substitute(B1,",",""),A1:A500,1,0),"Nope!")
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  5. #5
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Formulas to see if names in one column exists on the names in the second column

    Quote Originally Posted by ranman256 View Post
    in LAST,FIRST field (here called col A),
    have one col (ex. Y) get the last name of A=left(a1,instr(a1,",")-1)
    then (ex Z) get first name, have the formula: = mid(a1,instr(a1,",")+1)

    in another check the the 2 first name colunns, and the two last names
    Isn't INSTR() a VBA only function? The formula equivelant would be a MID/FIND combination.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formulas to see if names in one column exists on the names in the second column

    One way...

    Data Range
    A
    B
    C
    D
    E
    1
    Name
    Is A Match
    ------
    ------
    Name
    2
    Bear, Yogi
    TRUE
    Sam Snead
    3
    Del Grecco, Al
    TRUE
    Yogi Bear
    4
    West, Roger
    FALSE
    Frank Zappa
    5
    Clearwater, Burt
    FALSE
    Al Del Grecco


    This formula entered in B2 and copied down:

    =ISNUMBER(MATCH(MID(A2&" "&A2,FIND(",",A2)+2,LEN(A2)-1),E:E,0))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Registered User
    Join Date
    07-24-2014
    Location
    Atlanta, Georgia
    MS-Off Ver
    2007
    Posts
    15

    Re: Formulas to see if names in one column exists on the names in the second column

    Quote Originally Posted by Tony Valko View Post
    One way...

    Data Range
    A
    B
    C
    D
    E
    1
    Name
    Is A Match
    ------
    ------
    Name
    2
    Bear, Yogi
    TRUE
    Sam Snead
    3
    Del Grecco, Al
    TRUE
    Yogi Bear
    4
    West, Roger
    FALSE
    Frank Zappa
    5
    Clearwater, Burt
    FALSE
    Al Del Grecco


    This formula entered in B2 and copied down:

    =ISNUMBER(MATCH(MID(A2&" "&A2,FIND(",",A2)+2,LEN(A2)-1),E:E,0))
    Holy Sxxt,

    This is genius man. Thank u. Worked like a charm.

  8. #8
    Registered User
    Join Date
    07-24-2014
    Location
    Atlanta, Georgia
    MS-Off Ver
    2007
    Posts
    15

    Re: Formulas to see if names in one column exists on the names in the second column

    Quote Originally Posted by jkim204 View Post
    Holy Sxxt,

    This is genius man. Thank u. Worked like a charm.
    Edit: Wait some of them don't show up right... It should be true but it shows up as false...
    Is it because the middle initals are included in the first column of names?

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formulas to see if names in one column exists on the names in the second column

    Post some representative sample data!

  10. #10
    Registered User
    Join Date
    07-24-2014
    Location
    Atlanta, Georgia
    MS-Off Ver
    2007
    Posts
    15

    Re: Formulas to see if names in one column exists on the names in the second column

    Quote Originally Posted by Tony Valko View Post
    Post some representative sample data!
    It's in the original post. Thank you.

  11. #11
    Registered User
    Join Date
    07-24-2014
    Location
    Atlanta, Georgia
    MS-Off Ver
    2007
    Posts
    15

    Re: Formulas to see if names in one column exists on the names in the second column

    Bump.. Still not able to figure out how to fix the problem.

  12. #12
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Formulas to see if names in one column exists on the names in the second column

    There appears to be an error with the attachment, at least for me.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  13. #13
    Registered User
    Join Date
    07-24-2014
    Location
    Atlanta, Georgia
    MS-Off Ver
    2007
    Posts
    15

    Re: Formulas to see if names in one column exists on the names in the second column

    Quote Originally Posted by XOR LX View Post
    There appears to be an error with the attachment, at least for me.

    Regards
    How about now ?!

  14. #14
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formulas to see if names in one column exists on the names in the second column

    Quote Originally Posted by XOR LX View Post
    There appears to be an error with the attachment, at least for me.
    Same here.

    Excel (2010) says it can't open the file.

  15. #15
    Registered User
    Join Date
    07-24-2014
    Location
    Atlanta, Georgia
    MS-Off Ver
    2007
    Posts
    15

    Re: Formulas to see if names in one column exists on the names in the second column

    Quote Originally Posted by Tony Valko View Post
    Same here.

    Excel (2010) says it can't open the file.
    hmm one second.. it's an xlsx file but maybe I have to decrypt it..

  16. #16
    Registered User
    Join Date
    07-24-2014
    Location
    Atlanta, Georgia
    MS-Off Ver
    2007
    Posts
    15

    Re: Formulas to see if names in one column exists on the names in the second column

    Quote Originally Posted by jkim204 View Post
    hmm one second.. it's an xlsx file but maybe I have to decrypt it..
    or pm me your emails and I'll send u the files..

  17. #17
    Registered User
    Join Date
    07-24-2014
    Location
    Atlanta, Georgia
    MS-Off Ver
    2007
    Posts
    15

    Re: Formulas to see if names in one column exists on the names in the second column

    Quote Originally Posted by jkim204 View Post
    or pm me your emails and I'll send u the files..
    Can no one still download it yet?

  18. #18
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formulas to see if names in one column exists on the names in the second column

    Try this one in B1 and copy down

    =IFERROR(VLOOKUP(REPLACE(A1,1,FIND(" ",A1),"")&" "&LEFT(A1,FIND(",",A1)-1),$C$1:$C$412,1,0),"N/A")
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  19. #19
    Registered User
    Join Date
    07-24-2014
    Location
    Atlanta, Georgia
    MS-Off Ver
    2007
    Posts
    15

    Re: Formulas to see if names in one column exists on the names in the second column

    Quote Originally Posted by AlKey View Post
    Try this one in B1 and copy down

    =IFERROR(VLOOKUP(REPLACE(A1,1,FIND(" ",A1),"")&" "&LEFT(A1,FIND(",",A1)-1),$C$1:$C$412,1,0),"N/A")
    It shows up as NA lol

  20. #20
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Formulas to see if names in one column exists on the names in the second column

    I was able to download the file from post #1 and open it in Excel 2007 & 2013.

  21. #21
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formulas to see if names in one column exists on the names in the second column

    Please see attached file.
    Attached Files Attached Files

  22. #22
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Formulas to see if names in one column exists on the names in the second column

    Doesn't work on 2 word last names.

    Row 56: Del Valle, Clark

    Added Clark Del Valle to column C and the formula returned N/A.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 01-08-2014, 01:56 PM
  2. Show query column names behind pivot table field names
    By gbritton in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-18-2013, 03:17 PM
  3. Excel Names in column to text files names to folder
    By excelaron in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-17-2013, 07:22 PM
  4. Replies: 5
    Last Post: 01-13-2012, 03:20 PM
  5. Replies: 2
    Last Post: 11-19-2011, 01:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1