+ Reply to Thread
Results 1 to 3 of 3

Aggregate Help

  1. #1
    Registered User
    Join Date
    01-17-2019
    Location
    US
    MS-Off Ver
    2016
    Posts
    9

    Aggregate Help

    Is there an Aggregate function to get an Average of A1:A99 for example that will ignore 0's and Hidden Rows. I can get it to work just ignoring Hidden Rows but can't figure out how to Ignore 0's

    =AGGREGATE(1,7,G4:G103) - Here's what I have now

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Aggregate Help

    Hi,

    It would have been useful if Microsoft had included an option to exclude zeroes within the options parameter.

    Since they didn't, the standard workaround is a volatile array formula**:

    =AVERAGE(IF(SUBTOTAL(103,OFFSET(G4,ROW(G4:G103)-MIN(ROW(G4:G103)),)),IF(G4:G103<>0,G4:G103)))

    A non-volatile alternative is this triple-AGGREGATE set-up:

    =AGGREGATE(9,7,G4:G103)/SUMPRODUCT(N(AGGREGATE(14,7,G4:G103,ROW(INDEX(A:A,1):INDEX(A:A,AGGREGATE(3,7,G4:G103))))<>0))

    Regards

    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Click * below if this answer helped

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

  3. #3
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Aggregate Help

    Array formula
    Please Login or Register  to view this content.

+ 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] Index & aggregate
    By elatreille in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-09-2019, 08:22 AM
  2. Array to Aggregate (or VBA?)
    By BrianDove32 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-05-2018, 04:30 AM
  3. Aggregate by ID in DAX
    By JB_100 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-22-2017, 02:35 AM
  4. Aggregate Function Using Sum
    By gtbaseball7 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-01-2015, 02:19 PM
  5. [SOLVED] Aggregate forumla help
    By seanyc in forum Excel General
    Replies: 13
    Last Post: 06-15-2012, 02:42 PM
  6. How to aggregate data?
    By bumblebee88 in forum Excel General
    Replies: 3
    Last Post: 02-21-2012, 04:14 PM
  7. Best way to aggregate?
    By gnome_core in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-03-2009, 04:38 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