+ 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
    Office 365
    Posts
    26

    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 JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    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, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,396

    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, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    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
    Office 365
    Posts
    26

    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)

Similar Threads

  1. Comparing two sets of tests
    By Tipsmark02 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 06-25-2015, 03:26 PM
  2. Comparing two data sets
    By Jietoh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2014, 06:26 PM
  3. Comparing two sets of numbers using each value only once
    By soxcrates in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-25-2013, 05:50 PM
  4. Comparing multiple sets of columns for greater values
    By metsfan666 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-09-2012, 08:41 PM
  5. Comparing two sets of data
    By redrasta in forum Excel General
    Replies: 8
    Last Post: 02-16-2012, 08:56 AM
  6. Comparing two sets of numbers ...
    By MAPepin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-09-2009, 03:23 AM
  7. Comparing two sets of data
    By sheargraphix in forum Excel General
    Replies: 2
    Last Post: 06-26-2007, 01:38 PM

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