+ Reply to Thread
Results 1 to 5 of 5

Comparing 2 columns- if a match is found return a value in 3rd column

  1. #1
    Registered User
    Join Date
    12-20-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    3

    Comparing 2 columns- if a match is found return a value in 3rd column

    In Excel 2010 I am trying to compare 2 columns -both contain USER ID's. I want to compare column A to column B. If a match is found in column B, return a value in column C of "keep". Can anyone help me with this?
    Thank you.

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Comparing 2 columns- if a match is found return a value in 3rd column

    how do you want to compare? can you post an example?

    could try this (if you want to compare each A value against the entire B column and return a "keep" value if a match is found for that row):

    =IF(iserror(match(A1,B:B,0)),"","Keep") -- write this into cell c1 and copy/paste down the column
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    12-20-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Comparing 2 columns- if a match is found return a value in 3rd column

    Thanks for your prompt reply. I have a column of UserID's- unfiltered- that I want to compare to a column of USER ID's that I have filtered. If the unfiltered ID does not exist in the filtered column, I want to delete that ID. Does this explanation help?

  4. #4
    Registered User
    Join Date
    12-20-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Comparing 2 columns- if a match is found return a value in 3rd column

    This formula does work- thank you. Next question (do I need a new post?) What is an easy way to paste the forlmula into 26,000 + rows?

  5. #5
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: Comparing 2 columns- if a match is found return a value in 3rd column

    yes, just for the sake of this example lets say you have 26,500 rows of data starting in row 1 -- so column A will have entries from 1 to 26,500 --

    Here's what i would do:

    write the formula in cell C1
    Press enter
    select cell C1 but don't double-click (single click!)
    press cntrl+c to copy the cell
    single click on cell a1
    press cntrl+down arrow (this will "fly" you to the last cell with data in it A26500)
    single click on C26500 (the c column at this lowest row)
    press shift+cntrl+up arrow (this will highlight the C column from 1 to 26,500)
    Press Enter (this will paste the formula in every highlighted cell)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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