+ Reply to Thread
Results 1 to 3 of 3

Flag values in a list of pairs?

  1. #1
    Registered User
    Join Date
    07-15-2012
    Location
    Albuquerque, New Mexico
    MS-Off Ver
    Excel 2007
    Posts
    3

    Flag values in a list of pairs?

    Hi, I'm trying to flag particular values within a long list of pairs. Using the example below, the formula should evaluate which value each pair is the smallest, and return a text comment to it's right (such as the word "retain"). The larger value may remain blank. Note, I don't want to evaluate across pairs (for example, "a" to "b"), only within pairs ("a" to "a'). And I need to achieve this using a formula, with no help from filtering or sorting.

    PAIR: VALUE: FLAG:
    a 1 "retain"
    a 2
    b 3
    b 1 "retain"
    c 3
    c 2 "retain"

    Any help is greatly appreciated!
    ~Noob

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Flag values in a list of pairs?

    A
    B
    C
    1
    PAIR: VALUE: FLAG:
    2
    a
    1
    Retain
    3
    a
    2
    4
    b
    3
    5
    b
    1
    Retain
    6
    c
    3
    7
    c
    2
    Retain


    A
    B
    C
    1
    PAIR: VALUE: FLAG:
    2
    a
    1
    =IF(MIN(IF(($A$2:$A$7=A2),$B$2:$B$7,9^9))=B2,"Retain","")
    3
    a
    2
    =IF(MIN(IF(($A$2:$A$7=A3),$B$2:$B$7,9^9))=B3,"Retain","")
    4
    b
    3
    =IF(MIN(IF(($A$2:$A$7=A4),$B$2:$B$7,9^9))=B4,"Retain","")
    5
    b
    1
    =IF(MIN(IF(($A$2:$A$7=A5),$B$2:$B$7,9^9))=B5,"Retain","")
    6
    c
    3
    =IF(MIN(IF(($A$2:$A$7=A6),$B$2:$B$7,9^9))=B6,"Retain","")
    7
    c
    2
    =IF(MIN(IF(($A$2:$A$7=A7),$B$2:$B$7,9^9))=B7,"Retain","")


    Column C formula is an Array Formula-Requires CTRL+SHIFT+ENTER

    Array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER.
    Last edited by :) Sixthsense :); 01-30-2015 at 11:59 PM.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    07-15-2012
    Location
    Albuquerque, New Mexico
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Flag values in a list of pairs?

    I must be misunderstanding something about your method because I couldn't replicate it successfully, but fortunately all my pairs are in order, so I was able to solve it this way:
    =IF(CHOOSE(MOD(ROW(A1),2)+1, B2 < B1,B2 < B3),"retain","")

    Thanks so much for your help anyway!

+ 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] How to generate a list of pairs for all combination possible?
    By Laeticha in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-05-2015, 08:56 AM
  2. [SOLVED] Formula to Flag names in list 1 that do not exist in list 2.
    By shepherdc2814 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-16-2013, 11:28 AM
  3. Create list of pairs based on conditions
    By Xenos27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2013, 09:24 AM
  4. Replies: 2
    Last Post: 12-14-2010, 02:21 AM
  5. Select Pairs Of Names From List Containing Dupes
    By callenco in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2010, 07:28 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