+ Reply to Thread
Results 1 to 5 of 5

Selecting Pairs of Numbers

  1. #1
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Selecting Pairs of Numbers

    Hey, I'm looking for a formula that will allow me to select Pairs (of numbers) for a group of numbers. Each number is in a different Column. See example below..


    9 1 8 2
    3 3 6 3
    7 4 1 5
    9 5 5 2
    0 1 5 6
    3 0 6 4
    4 3 1 0
    0 3 2 7

    What i want to do is select any row that has the pair (in any order) 91 and/or 63 and/or 54

    As you can see there is a number of rows that does not have either of the stated Pairs.
    Last edited by Jordans121; 03-21-2011 at 04:12 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Selecting Pairs of Numbers

    When you say "Select" what do you mean exactly ?

    Do you mean "Select" aesthetically (eg Conditional Formatting) or physically (VBA) ?

    In terms of Conditional Formatting - a very basic rule would be:

    Please Login or Register  to view this content.
    There is a bug with Conditional Format Array Formulae in XL2007 so best to keep as simple as possible (if a little long winded)
    The IF approach is simply to minimise no. of COUNTIF calculations being performed (ie pairs only tested in prior pairs not found) - else you could just add the various results

  3. #3
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: Selecting Pairs of Numbers

    When I say Select I'm referring to Filtering "true"

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Selecting Pairs of Numbers

    When filtering in this context it is IMO best to work with a single column

    Either:

    a) populate a single adjacent column with the formula provided previously and subsequently filter for 1 in that column

    or

    b) create a "key" of concatenated numbers (with delimiter) in a single adjacent column (ranked smallest to largest) - you can then use a filter on the "key" column looking for *^1stnumber^*^2ndnumber^*" with OR repeating for each pair.

    I would say Option a) is simpler (and offers greater scope for additional pairs)

  5. #5
    Forum Contributor
    Join Date
    01-21-2010
    Location
    Chicago,Illinois
    MS-Off Ver
    Excel 2019
    Posts
    206

    Re: Selecting Pairs of Numbers

    I think option A is better

+ 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