Results 1 to 13 of 13

How to subtotal only if certain conditions apply

Threaded View

  1. #1
    Registered User
    Join Date
    10-30-2014
    Location
    Riga
    MS-Off Ver
    Excel 2010
    Posts
    11

    How to subtotal only if certain conditions apply

    Hi,

    I found similar questions online but none of the answers worked for me.

    I need in BD to make an average of the values in color BB7:BB10000, but only if 2 conditions are met (in this case, if the "route" in AP is the same, and if the "week" in AT is the same).

    Normally, I would do like this (in row 7):

    =AVERAGEIFS($BB$7:$BB$10000;$AP$7:$AP$10000;AP7;$AT$7:$AT$10000;AT7) and drag the formula all the way down.

    Of course Average Ifs would work perfectly on a static array of numbers, but I need the calculation to adapt to the filtering, so I need to use subtotal somehow.

    I found this formula but I wasn't able to make it work, probably because I do not know how to apply it properly

    {=AVERAGE(IF(SUBTOTAL(2,OFFSET(B2,ROW(B2:B100)-ROW(B2),0)),IF(A2:A100="x",B2:B100)))}

    Any suggestions?

    Thank you

    Giovanni
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Line when missing after apply Subtotal functions
    By szern9356 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-30-2013, 02:55 AM
  2. [SOLVED] Apply subtotal when I have a different range
    By Ashrak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-25-2013, 10:16 AM
  3. Apply filter then subtotal
    By staples in forum Excel General
    Replies: 5
    Last Post: 10-13-2009, 01:54 PM
  4. How to apply conditions on charts
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-12-2009, 09:57 AM
  5. Subtotal Macro how can I apply #rounding?
    By Casey in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2005, 02:08 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