+ Reply to Thread
Results 1 to 5 of 5

LARGE with second/third array in case of a tie ?

  1. #1
    Forum Contributor
    Join Date
    08-28-2015
    Location
    Montreal, Canada
    MS-Off Ver
    2013 on PC, 2011 on MAC
    Posts
    159

    LARGE with second/third array in case of a tie ?

    Hey guys,

    I'm trying to use a LARGE function (at least, I think it's the right function to use) that would kinda act like a 'sort'...but need to add a second array (and even possibly a third array) to be used in case of a tie in the first one.

    Basically, first filter should be $F$5:$F$14 (Largest to smallest), second filter $G$5:$G$14 (Largest to smallest). If a third array is possible, then $B$5:$B$14 (Alphabetically).

    Any ideas ?

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: LARGE with second/third array in case of a tie ?

    is that what you want?
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    confirmed by Control+Shift+Enter

    adjust ranges to your needs

  3. #3
    Forum Contributor
    Join Date
    08-28-2015
    Location
    Montreal, Canada
    MS-Off Ver
    2013 on PC, 2011 on MAC
    Posts
    159

    Re: LARGE with second/third array in case of a tie ?

    Not really, unless I'm applying it wrong...

    Here, I attached a xls sheet to show what I'm trying to do exactly.

    Basically, I'm trying to use an INDEX/MATCH function in Column I to return the names from Column B and sort them by PTS (Column F), then HITS (Column G) if PTS are equals, and then NAMES (Column B) if PTS and HITS are equals...
    ...all using a LARGE function, though I'm not entirely sure it's the best way to go. In fact, I'm not entirely sure what I'm trying to achieve can be done by a formula.
    Attached Files Attached Files

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: LARGE with second/third array in case of a tie ?

    You mean: =IF(PTS=PTS,LARGE(HTS,ROW(1:1)),IF(AND(PTS=PTS.HTS=HTS),SMALL(CODE(MAMES),ROW(1:1)),LARGE(PTS,ROW(1:1)))) ? - bad idea
    Maybe this one:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and Ctrl+Shift+Enter

    if cells in col E (PTS) are not equels - sort col A (NAMES) by col E by LARGE().
    If any cells in col E (PTS) are equels and cells in col F (HITS) are not equels - sort col A (NAMES) by col F (HITS) by LARGE().
    If any cells in col E (PTS) are equels and any cells in col F (HITS) are equels - sort col A (NAMES) in alphabetical order

    Updated

    I forced to use LARGE()
    Last edited by sandy666; 12-23-2016 at 02:50 AM. Reason: typo

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: LARGE with second/third array in case of a tie ?

    Try this...

    I use a rank formula then sort based on rank.

    Data Range
    B
    C
    D
    E
    F
    G
    H
    I
    4
    NAMES
    W
    L
    OTL
    PTS
    HITS
    Rank
    Leader
    5
    DANO
    1
    0
    0
    2
    34
    2
    LORD
    6
    DELISLE
    0
    1
    0
    0
    23
    3
    DANO
    7
    GOSSELIN
    0
    0
    0
    0
    0
    5
    DELISLE
    8
    GRENIER
    0
    1
    0
    0
    22
    4
    GRENIER
    9
    LEBEAU
    0
    0
    0
    0
    0
    6
    GOSSELIN
    10
    LORD
    1
    0
    0
    2
    54
    1
    LEBEAU
    11
    MALLETTE
    0
    0
    0
    0
    0
    7
    MALLETTE
    12
    POIRIER
    0
    0
    0
    0
    0
    8
    POIRIER
    13
    RIVARD
    0
    0
    0
    0
    0
    9
    RIVARD
    14
    VACHON
    0
    0
    0
    0
    0
    10
    VACHON


    This formula entered in H5 and copied down:

    =RANK(F5,F$5:F$14)+SUMPRODUCT(--(F$5:F$14=F5),--(G$5:G$14>G5))+SUMPRODUCT(--(F$5:F$14=F5),--(G$5:G$14=G5),--(B$5:B$14<B5))

    This formula entered I5 and copied down:

    =INDEX(B$5:B$14,MATCH(ROWS(I$5:I5),H$5:H$14,0))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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] Look within a large array of values for a small array that meets a certain criteria
    By sean2222 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-02-2016, 11:41 AM
  2. [SOLVED] Select Case Array
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-06-2015, 10:24 AM
  3. Replies: 1
    Last Post: 08-21-2013, 03:05 AM
  4. [SOLVED] Select Case Statement Alternative Large Number of Combinations
    By plasma33 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-24-2012, 06:28 AM
  5. Array case conversion
    By bonk1954 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2011, 03:05 PM
  6. Transferring part of a large array to smaller array
    By Xrull in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-26-2011, 09:39 AM
  7. Using an array in a case statment
    By nods in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-17-2010, 12:25 PM

Tags for this Thread

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