+ Reply to Thread
Results 1 to 4 of 4

Matching pairs based on criteria

  1. #1
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2019
    Posts
    758

    Matching pairs based on criteria

    Hi all,

    On the attached spreadsheet is 28 rows of data, across columns A-M (with F to I hidden)

    The data shown are pairs, based on their location and the times. The cell in column M is highlighted when there is a location and time match.

    At times I can work with 000's of rows of data and then I need to number the pairs in column D, as shown.

    A pair would be worked out based on column M being highlighted and the times in column C for the rows are within 10 minutes of a different coloured call (as shown by column A).

    I have started numbering the instances to show an example, but for 20,000 rows where there could be 9,000 instances it is hard to do manually.

    Any ideas how to automate the pairing?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: Matching pairs based on criteria

    How do you compare location. When I compare by time, within ten minutes, they all highlight

  3. #3
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,673

    Re: Matching pairs based on criteria

    There is nothing in your data that looks like it would be a location, and every cell in column M is highlighted, so it's hard to figure out what your criteria are.

  4. #4
    Forum Contributor
    Join Date
    03-04-2014
    Location
    Birmingham, England
    MS-Off Ver
    Excel 2019
    Posts
    758

    Re: Matching pairs based on criteria

    Hi guys,

    sorry - hopefully this attachment helps more.

    on sheet called "Schedule" there is some data. If you press the big blue square it runs the following code:

    Please Login or Register  to view this content.
    The code is looking to see if any of the location pairs in the "Near values 2" tab feature in the "Schedule" tab, where the time is within 10 minutes and the subject number is different (Column AD)

    As you will see on the schedule tab between rows 2 and 3 there is a match to a pair in "Near Values 2" and the time is within 10 minutes. If you run the code, then the values in column M are highlighted yellow.

    Also you will see that in the instance column there are two numbers 1s in here, with two number 2s in the next pair between rows 25 and 26.

    I have manually added these numbers in, but want to automate it so that when the values in column M are highlighted yellow, the numbers are put in column D - so show a sequence.


    Can anyone help please?
    Attached Files Attached Files

+ 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. [SOLVED] Retain set of 4rows (pairs) based on multilple criteria in several columns
    By analystbank in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-08-2016, 06:19 AM
  2. Matching Pairs
    By junada0 in forum Excel General
    Replies: 2
    Last Post: 02-11-2015, 05:46 PM
  3. aligning cells based on matching data in column pairs
    By freshfor88 in forum Excel General
    Replies: 2
    Last Post: 08-13-2014, 01:32 PM
  4. Matching Pairs
    By Jordans121 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-24-2013, 04:20 PM
  5. [SOLVED] Count Unique Pairs of Excel Entries Based on Criteria
    By DonFord81 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-22-2013, 01:12 PM
  6. [SOLVED] finding matching pairs
    By dave wagner in forum Excel General
    Replies: 2
    Last Post: 07-12-2011, 02:28 AM
  7. Replies: 10
    Last Post: 01-05-2011, 03:26 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