+ Reply to Thread
Results 1 to 4 of 4

Comparing two columns

  1. #1
    Registered User
    Join Date
    08-14-2009
    Location
    No
    MS-Off Ver
    Excel 2003
    Posts
    20

    Comparing two columns

    I have two columns of ID's, A and B. I want to know if each value in column A is in column B.

    There's got to be an easy formula for this...thoughts?

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Super simple question - comparing two columns

    Copy this formula another column and drag it down the column as needed. It will count if the values in "A" appear in "B". Adjust range to suit.

    =COUNTIF($B$2:B100,A2)
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Registered User
    Join Date
    08-14-2009
    Location
    No
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: Super simple question - comparing two columns

    Quote Originally Posted by Palmetto View Post
    Copy this formula another column and drag it down the column as needed. It will count if the values in "A" appear in "B". Adjust range to suit.

    =COUNTIF($B$2:B100,A2)
    Great, that gives me a column of 1's and 0's. Now I want to get just the EMPLID's that have a '1' associated with it.

    I could use a filter to do this, but is there another formula that I can use? I'm just wondering how you Excel guru's do this kind of thing.

  4. #4
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Comparing two columns

    Use Auto-Filter to show only the rows that have a "1" then copy the visible rows.

    Optional:
    Pivot Table using the column counting column as the Page Field and show only "1"

    Or

    Use Advanced Filter with criteria to extract the records where the value is equal to "1".

+ 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