+ Reply to Thread
Results 1 to 10 of 10

Column comparison

  1. #1
    Registered User
    Join Date
    08-11-2014
    Location
    Wellington
    MS-Off Ver
    2013
    Posts
    28

    Question Column comparison

    How do I compare two columns A,B and extract the unique values from B to another column C.

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

    Re: Column comparison

    Show us some sample data along with the result you expect.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    08-11-2014
    Location
    Wellington
    MS-Off Ver
    2013
    Posts
    28

    Re: Column comparison

    I want to compare these two columns and paste the values that are unique to B in C
    Please Login or Register  to view this content.
    Last edited by avinkris; 08-11-2014 at 11:58 PM.

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

    Re: Column comparison

    Show us what results you expect.

  5. #5
    Registered User
    Join Date
    08-11-2014
    Location
    Wellington
    MS-Off Ver
    2013
    Posts
    28

    Re: Column comparison

    the result must be like in column ( I have updated the table above)

  6. #6
    Registered User
    Join Date
    02-23-2014
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: Column comparison

    do you want to get the unique values in Column A and B to column C ? So your result should be Column C right?

  7. #7
    Registered User
    Join Date
    02-23-2014
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: Column comparison


  8. #8
    Registered User
    Join Date
    02-23-2014
    Location
    Qatar
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: Column comparison


  9. #9
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Column comparison

    Try this Array formula which requires confirmation with Ctrl+shift+Enter instead of just Enter.

    in C2
    Please Login or Register  to view this content.
    and copy down.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

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

    Re: Column comparison

    Ok, looks like you want items from column B that are not in column A.

    Data Range
    A
    B
    C
    1
    List1
    List2
    In B but not in A
    2
    0000000481te1a6
    0000000481te1a6
    0000001001rj535
    3
    0000000481te1a6
    0000000481te1a6
    0000001002nz922
    4
    0000000483te123
    0000000483te123
    0000001003edb83
    5
    0000000483te123
    0000000483te123
    6
    0000000485te0ac
    0000000485te0ac
    7
    0000000485te0ac
    0000000485te0ac
    8
    0000000486tec6c
    0000000486tec6c
    9
    0000000486tec6c
    0000000486tec6c
    10
    0000001001cb724
    0000001001cb724
    11
    0000001001edb06
    0000001001edb06
    12
    0000001001nz5e2
    0000001001rj535
    13
    0000001001nz5e2
    0000001002nz922
    14
    0000001002ed7c6
    0000001003edb83


    Enter this array formula** in C2:

    =IFERROR(INDEX(B:B,SMALL(IF(ISNA(MATCH(B$2:B$14,A$2:A$14,0)),ROW(B$2:B$14)),ROWS(C$2:C2))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks.
    Last edited by Tony Valko; 08-12-2014 at 02:12 PM.

+ 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: 1
    Last Post: 08-05-2014, 02:15 AM
  2. Replies: 3
    Last Post: 06-22-2014, 08:55 AM
  3. Replies: 1
    Last Post: 11-22-2013, 05:56 AM
  4. Replies: 8
    Last Post: 05-15-2013, 04:50 PM
  5. Replies: 1
    Last Post: 04-23-2013, 12:46 AM

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