+ Reply to Thread
Results 1 to 10 of 10

Match two columns of data - return mismatches third column

  1. #1
    Registered User
    Join Date
    09-13-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2010
    Posts
    4

    Match two columns of data - return mismatches third column

    So I have been trying to figure this out.

    I have a list of serial numbers in column A that are accurate. I have a list in column B that is inaccurate. The lists are of different sizes and are not in order. I need a formula that compares the numbers in A to the numbers in B and gives the numbers that do not match into column c. I have tried conditional formatting and a couple of other things and none of them have been accurate.

    I attached a copy of the sheet I am working on. Any help would be greatly appreciated.





    Serial compare.xls

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Match two columns of data - return mismatches third column

    Why not use vlookup. In C2, enter =IF(ISERROR(VLOOKUP(B177,$A$2:$A$1033,1,0)),B177,"") and drag it down.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: Match two columns of data - return mismatches third column

    try this....
    in column C, =IFERROR(VLOOKUP(B2,$A$2:$A$1033,1,FALSE),"") (B compared to A)
    in column D, =IFERROR(VLOOKUP(A2,$B$2:$B$1033,1,FALSE),"") (A compared to B)

    im working on a CF for this too, so let me know if the above will be what you need?

    ok, if you want to use CF, highlight all data in column B, and use this under "use formula" in CF...

    =B2=VLOOKUP(B2,$A$2:$A$1033,1,FALSE)
    Last edited by FDibbins; 09-13-2012 at 05:47 PM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    09-13-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Match two columns of data - return mismatches third column

    Quote Originally Posted by JieJenn View Post
    Why not use vlookup. In C2, enter =IF(ISERROR(VLOOKUP(B177,$A$2:$A$1033,1,0)),B177,"") and drag it down.
    Wow thanks for the quick response!

    So it looks like this one returned numbers that are in column B but not in column A. I need to find the numbers that are in column A but not Column B

  5. #5
    Registered User
    Join Date
    09-13-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Match two columns of data - return mismatches third column

    Quote Originally Posted by FDibbins View Post
    try this....
    in column C, =IFERROR(VLOOKUP(B2,$A$2:$A$1033,1,FALSE),"") (B compared to A)
    in column D, =IFERROR(VLOOKUP(A2,$B$2:$B$1033,1,FALSE),"") (A compared to B)

    im working on a CF for this too, so let me know if the above will be what you need?

    ok, if you want to use CF, highlight all data in column B, and use this under "use formula" in CF...

    =B2=VLOOKUP(B2,$A$2:$A$1033,1,FALSE)

    Thanks for the quick reply. I tried this and it did not show just the serial numbers that are in column A but not in column B. I could have done something wrong though.

  6. #6
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: Match two columns of data - return mismatches third column

    Didn't realize in Column B some of the item has extra spaces. Here try again. Enter the formula with Ctrl + Shift + Enter together and drag it down. My first formula has an error. I apologize.

    =VLOOKUP(A2,TRIM($B$2:$B$936),1,FALSE)
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-13-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Match two columns of data - return mismatches third column

    Quote Originally Posted by JieJenn View Post
    Didn't realize in Column B some of the item has extra spaces. Here try again. Enter the formula with Ctrl + Shift + Enter together and drag it down. My first formula has an error. I apologize.

    =VLOOKUP(A2,TRIM($B$2:$B$936),1,FALSE)
    No need to apologize, I should be apologizing to you haha


    Ok so that returned 50 or so serials that are in column A and not in column B so that is great. There is a 138 serial difference in numbers though. Column A has 1033 serials and column b has 894.

    Thanks again you have been a huge help

  8. #8
    Registered User
    Join Date
    08-21-2014
    Location
    Farifax, VA
    MS-Off Ver
    Windows 7
    Posts
    36

    Re: Match two columns of data - return mismatches third column

    I'm trying to use these formulas to find a mismatch of dates between two columns. I only want something (e.g., the word "mismatch") in the column with the result if there is a mismatch. Here is an example of the two columns.

    Departure JSA Departure Date RI
    31-Jul-14 31-Jul-14
    31-Jul-14 31-Jul-14
    31-Jul-14 31-Jul-14
    30-Jul-14 30-Jul-14
    30-Jul-14 30-Jul-14
    31-Jul-14 31-Jul-14
    31-Jul-14 31-Jul-14
    31-Jul-14 31-Jul-14
    31-Jul-14 31-Jul-14
    31-Jul-14 31-Jul-14
    31-Jul-14 31-Jul-14
    31-Jul-14 31-Jul-14
    30-Jul-14 30-Jul-14
    30-Jul-14 30-Jul-14
    30-Jul-14 30-Jul-14
    30-Jul-14 30-Jul-14
    30-Jul-14 30-Jul-14
    30-Jul-14 30-Jul-14
    31-Jul-14 30-Jul-14
    31-Jul-14 31-Jul-14
    30-Jul-14 30-Jul-14
    30-Jul-14 30-Jul-14
    30-Jul-14 30-Jul-14
    1-Aug-14 30-Jul-14

    I've tried the formulas above, and only dates come out whether they match or not. That's not what I want. I tried an IF statement --> =IF(A1 = B1, 0, "mismatch"), but it didn't work.

    I'm also comparing a two columns of names and there could be some names in column A that aren't in column B and vice versa. I need to find the names that are missing when comparing the two lists. Any help on that would be appreciated also.

  9. #9
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,970

    Re: Match two columns of data - return mismatches third column

    chcalissie,
    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Ben Van Johnson

  10. #10
    Registered User
    Join Date
    08-21-2014
    Location
    Farifax, VA
    MS-Off Ver
    Windows 7
    Posts
    36

    Re: Match two columns of data - return mismatches third column

    I'm very sorry.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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