+ Reply to Thread
Results 1 to 6 of 6

A totals function which works using filters

  1. #1
    Registered User
    Join Date
    05-11-2013
    Location
    Wigan, Englan
    MS-Off Ver
    Excel 2010
    Posts
    46

    A totals function which works using filters

    Hi everyone

    I hope you are well!

    I am trying to get a formula (at least I think this one is a formula issue) which will sum a set of cells depending upon what data is filtered. These total also have to be in a cell which allow me to add more data to the rows.

    Please see excel sheet provided and have a go if you wish.

    Thanks

    Mike

    Forecast Totals.xlsx

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: A totals function which works using filters

    Try

    =SUBTOTAL(9,C2:C5)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: A totals function which works using filters

    I went with:
    =SUBTOTAL(9,INDIRECT("B2:B"&ROW(B10)-1))
    =SUBTOTAL(9,INDIRECT("C2:C"&ROW(C10)-1))

    The INDIRECT function will allow you to insert rows and not have to worry about adjusting the references.

  4. #4
    Registered User
    Join Date
    05-11-2013
    Location
    Wigan, Englan
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: A totals function which works using filters

    Yes that works but if I insert a new row then the formula becomes redundant. If I put the formula =SUBTOTAL(9,C:C) this works but only in another cell as I am circular referencing as I will be totalling the total. Is there any way round this?

  5. #5
    Registered User
    Join Date
    05-11-2013
    Location
    Wigan, Englan
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: A totals function which works using filters

    Thats brilliant. Thanks for both your responses they are much appreciated!!!!!!

    Mike

  6. #6
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: A totals function which works using filters

    Sorry, in my example I had the subtotals considerably lower:

    =SUBTOTAL(9,INDIRECT("B2:B"&ROW(B6)-1))
    =SUBTOTAL(9,INDIRECT("C2:C"&ROW(C6)-1))

    The formulas should update automatically to any inserted rows.

    The row references above should be the same as the cell you're putting them in, wherever they are.

+ 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. SUMPRODUCT Function with Filters
    By R_ka_Tect in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-18-2013, 10:03 AM
  2. SUM Function with Filters
    By jammy1812 in forum Excel General
    Replies: 2
    Last Post: 06-19-2012, 04:51 AM
  3. using filters with the sum function
    By justinelliott in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-14-2005, 04:40 AM
  4. [SOLVED] Creating a Macros function but co9ntent of function only works in a sub plz help
    By Alexandre Brisebois (www.pointnetsolutions.com) in forum Excel General
    Replies: 6
    Last Post: 07-20-2005, 04:05 PM
  5. Apply column totals with Filters?
    By Al Franz in forum Excel General
    Replies: 1
    Last Post: 03-06-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