Results 1 to 10 of 10

Return column header by comparing multiple row values conditions

Threaded View

  1. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,677

    Re: Return column header by comparing multiple row values conditions

    Quote Originally Posted by aschom View Post
    If more than one column is still tied return multiple column headers.
    It would be almost impossible to do that in one cell using formulas.......but you could do that in multiple cells:

    Put this formula in D26

    Formula: copy to clipboard
    =IFERROR(INDEX($C2:$L2,SMALL(IF(($C24:$L24=MAX($C24:$L24))*($C22:$L22=$A22&$B22)*(MIN(IF(($C22:$L22=$A22&$B22)*($C24:$L24=MAX($C24:$L24)),ABS($C23:$L23-$B23)))=IF(($C22:$L22=$A22&$B22)*($C24:$L24=MAX($C24:$L24)),ABS($C23:$L23-$B23))),COLUMN($C2:$K2)-COLUMN($C2)+1),COLUMNS($D26:D26))),"")


    confirm with CTRL+SHIFT+ENTER and copy across to G26 or further depending on the maximum possible ties there might be.

    If there is only one winner after the second tie-break then that will put that winner in D26 and leave the other cells blank. If there are 2 or more winners it will list those in D26, E26 etc.

    See attached example where I changed the values so that Matt and Dillon are tied - change C23 to 92 or 90 and see how that changes the result....
    Attached Files Attached Files
    Last edited by daddylonglegs; 09-06-2012 at 05:12 PM.
    Audere est facere

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