+ Reply to Thread
Results 1 to 8 of 8

LARGE function adjusted for filtered subtotals

  1. #1
    Registered User
    Join Date
    09-09-2014
    Location
    Utrecht, Netherlands
    MS-Off Ver
    2010
    Posts
    11

    LARGE function adjusted for filtered subtotals

    Excel Problem 1.xlsx

    Dear All,

    I am having some issues with the LARGE function in conjunction with filters. In the Excel file provided, I want to rank the company past year returns from largest to smallest. However, while doing this I want to filter on Fiscal Year so I can check the ranking of returns per Fiscal Year.

    I already got a formula from some forum (Mr. Excel?) but clearly, it doesn't work for me. Since I do not fully grasp (if, at all) the ranking formula in the workbook, I do not know why it returns an error and what to correct.

    If anyone could help me with this I would be eternally grateful! (Well, probably for a few weeks anyway)

    Regards,

    Hieronymus5
    Last edited by Hieronymus5; 09-17-2014 at 08:55 AM. Reason: Solved post

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: LARGE function adjusted for filtered subtotals

    Formula in F3 and down is an ARRAY formula. Read how to use these formulaw in the link that i provide.

    -- Array(CSE) { }, formulae are confirmed with Control+Shift+Enter.
    Not just Enter.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: LARGE function adjusted for filtered subtotals

    1, that is an aray formula and needs to be confirmed with ctrl shift +enter
    2. once filter is applied it will hide the rows with your results in
    eg filtering by 1993 shows 4 results rows 6,33,78,104 but large 1,2,3,4 are in cells f3:f6 which are now hidden from view
    i havent 2010 but aggregate() could help here
    otherwise id add a column that numbers filtered rows and reference that
    eg in g3 filled down
    =IF(SUBTOTAL(3,$A3),1+MAX($G$2:G2),"")
    then change your formula to
    {=LARGE(IF(SUBTOTAL(2, OFFSET($D$3,ROW($D$3:$D$122)-ROW($D$3),,1)),$D$3:$D$122),G3)}
    see attached
    you can wrap that in iferror
    Attached Files Attached Files
    Last edited by martindwilson; 09-17-2014 at 04:11 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: LARGE function adjusted for filtered subtotals

    Hi

    You can use this without array formula


    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copy down this go with filter row

    Yeah Martin didn't see till read it clear, Thank for point it out.
    Last edited by micope21; 09-17-2014 at 04:39 AM.
    To help you by my post? it would be nice to click on to say "Thank you".
    If you are happy with a solution to your problem?
    Click Thread Tools above your first post,
    select "Mark your thread as Solved".

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: LARGE function adjusted for filtered subtotals

    micope21 it is required to give large for filtered rows

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: LARGE function adjusted for filtered subtotals

    had a rethink you can include it in one formula without a helper column assuming there will always be something in column a
    {=LARGE(IF(SUBTOTAL(2, OFFSET($D$3,ROW($D$3:$D$122)-ROW($D$3),,1)),$D$3:$D$122),SUBTOTAL(3,$A$3:A3))}

  7. #7
    Registered User
    Join Date
    09-09-2014
    Location
    Utrecht, Netherlands
    MS-Off Ver
    2010
    Posts
    11

    Re: LARGE function adjusted for filtered subtotals

    Thank you all for responding as quickly as y'all did! Your solutions and feedback have helped me a great deal and saved ALOT of time.

    Thanks, Hieronymus5
    Last edited by Hieronymus5; 09-17-2014 at 08:56 AM.

  8. #8
    Registered User
    Join Date
    12-27-2020
    Location
    Saudi Arabia
    MS-Off Ver
    2016
    Posts
    1

    Re: LARGE function adjusted for filtered subtotals

    Amazing Amzing

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,935

    Re: LARGE function adjusted for filtered subtotals

    @kikoOo - I am watching you.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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] Copying large range of data into filtered cells
    By zigojacko in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2013, 04:11 AM
  2. Replies: 4
    Last Post: 09-04-2012, 06:09 AM
  3. How to make filtered list not erase subtotals.
    By DorothyFan1 in forum Excel General
    Replies: 1
    Last Post: 10-12-2011, 03:48 PM
  4. LARGE Function with subtotals
    By hindsight in forum Excel General
    Replies: 3
    Last Post: 08-03-2005, 10:09 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