+ Reply to Thread
Results 1 to 5 of 5

Comparing two sets of columns

  1. #1
    Registered User
    Join Date
    04-08-2013
    Location
    Illinois
    MS-Off Ver
    Excel 2007
    Posts
    13

    Comparing two sets of columns

    Hello,

    I'm looking to compare two sets of two columns to see if there are any matches. I have almost 4300 entries that have one column with a name, and one column with a date an employee did a trade. This is in A and B. I then have two columns with 800 entries where there was overtime paid out, names in D and dates in E. I'm trying to see if we ever paid overtime while someone was on a trade.

    I can't remember at the moment how to compare, if it is possible. I often compare lists of names or lists of dates, but not two columns. I've attached the document.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    1,454

    Re: Comparing two sets of columns

    this seemed to work. It is VBA instead of a formula. Takes about a minute to run.

    Please Login or Register  to view this content.
    It will highlight the names and dates in column A and B that are dublicated in columns D and E.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, click the 'Go Advanced' button, Then click 'Manage Attachements' and follow the menu.
    Thinking I am smart and knowing I am smart are two entirely different levels of schizophrenia.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    2007, 365
    Posts
    10,345

    Re: Comparing two sets of columns

    Formula solution.

    Uses a helper column in C with formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Then in G2 and filled down and across until you get blanks returns the Members and Dates of trades who/when overtime was paid.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Dave

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    mysore
    MS-Off Ver
    Excel 2007
    Posts
    4,557

    Re: Comparing two sets of columns

    In G2 then drag down.

    =IF(COUNTIFS($A$2:$A$4292,$D2,$B$2:$B$4292,$E2)>0,"On Trade","")
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Registered User
    Join Date
    04-08-2013
    Location
    Illinois
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Comparing two sets of columns

    Thank's guys for all your help! Got this figured out with your help!

+ 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