+ Reply to Thread
Results 1 to 8 of 8

Using Average with Subtotal function with criteria

  1. #1
    Registered User
    Join Date
    06-07-2012
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    32

    Using Average with Subtotal function with criteria

    Hi, please help.
    I have this group of filtered data which I need to get the average excluding NA and negative numbers.

    My initial formula is =AVERAGE(IF(SUBTOTAL(9,OFFSET(FG$11:FG$500,ROW(FG$11:FG$500)-MIN(ROW(FG$11:FG$500)),,1)),--(FG$11:FG$500<>"NA"),--(FG$11:FG$500>0))) but unfortunately, not working.

    Sample data:
    24
    12
    -42895
    NA
    NA

    Thank you!!
    Rianne ^^

  2. #2
    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,916

    Re: Using Average with Subtotal function with criteria

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    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.

  3. #3
    Registered User
    Join Date
    06-07-2012
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    32

    Re: Using Average with Subtotal function with criteria

    Hi, attached file for reference. Thank you.
    Attached Files Attached Files

  4. #4
    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,916

    Re: Using Average with Subtotal function with criteria

    That's no use, sorry - you have just copied and pasted values, so I am unable to look at and troubleshoot your formulae, as they are not there.

  5. #5
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Using Average with Subtotal function with criteria

    Hi Rianne,

    The AVERAGE function doesn't need to take into account NA as it is naturally ignored by the formula. This simplifies things.

    Try this formula - it worked on my version.
    Array formula, enter the formula and hit CTRL SHIFT ENTER.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    06-07-2012
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    32

    Re: Using Average with Subtotal function with criteria

    Hi quekbc, your suggested formula worked perfectly. Thanks so much!!!

  7. #7
    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,916

    Re: Using Average with Subtotal function with criteria

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  8. #8
    Registered User
    Join Date
    06-07-2012
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2016
    Posts
    32

    Re: Using Average with Subtotal function with criteria

    Thanks AliGW!

+ 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. SUBTOTAL with AVERAGE IFS or AVERAGE IFS only for visible values
    By LANGORIER in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-14-2015, 01:08 PM
  2. Replies: 4
    Last Post: 07-07-2015, 12:10 AM
  3. [SOLVED] Countifs arrays with multiple criteria and subtotal function
    By 5150 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-12-2013, 01:58 AM
  4. SubTotal function. How do I keep reuse Subtotal criteria.
    By davidthegolfer in forum Excel General
    Replies: 0
    Last Post: 10-10-2006, 03:28 AM
  5. Average function and two criteria
    By Paula M in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 09-06-2005, 07:05 PM
  6. How do I nesting subtotal function within average function in Exc
    By Amy Yeh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-19-2005, 04:06 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