+ Reply to Thread
Results 1 to 4 of 4

SUBTOTAL IF formula with auto filter

  1. #1
    Registered User
    Join Date
    05-21-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    2

    SUBTOTAL IF formula with auto filter

    I want to use auto filter in one column and then sum another column based on a certain value in that column and it must change with auto filter.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,800

    Re: SUBTOTAL IF formula with auto filter

    Use something like this:

    =SUBTOTAL(9,cell_range_in_other_column)

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    05-21-2013
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: SUBTOTAL IF formula with auto filter

    Thansk Pete but I want to filter one column and subtotal that column and then use a criteria to sum different things in another column see below. Want to filter direction and then want totals for Cash, Credit cards etc that must change according to the filter. thank you
    Year Plaza Direction Date Hour No Class MOP Vehicle Count Row
    Cash
    Credit Card
    Document
    e-tag PO
    Violation

    2012 CAROUSEL MAIN North 27-04-2012 12 1 Cash 2,579 1
    2012 CAROUSEL MAIN South 27-04-2012 12 1 Cash 371 1
    2012 CAROUSEL MAIN North 27-04-2012 12 1 Credit Card 716 1
    2012 CAROUSEL MAIN South 27-04-2012 12 1 Credit Card 173 1
    2012 CAROUSEL MAIN North 27-04-2012 12 1 Document 1 1
    2012 CAROUSEL MAIN North 27-04-2012 12 1 e-tag PO 38 1
    2012 CAROUSEL MAIN South 27-04-2012 12 1 e-tag PO 22 1
    2012 CAROUSEL MAIN North 27-04-2012 12 1 Violation 3 1
    2012 CAROUSEL MAIN North 27-04-2012 12 2 Cash 43 1
    2012 CAROUSEL MAIN South 27-04-2012 12 2 Cash 16 1
    2012 CAROUSEL MAIN North 27-04-2012 12 2 Credit Card 5 1
    2012 CAROUSEL MAIN South 27-04-2012 12 2 Credit Card 17 1
    2012 CAROUSEL MAIN North 27-04-2012 12 2 e-tag PO 1 1
    2012 CAROUSEL MAIN South 27-04-2012 12 2 e-tag PO 1 1

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: SUBTOTAL IF formula with auto filter

    If amounts to total are in J2:J100 and description like "Cash", "Credit card" in H2:H100 then this formula will give you the total for "Cash" only considering the visible rows

    =SUMPRODUCT(SUBTOTAL(9,OFFSET(J2,ROW(J2:J100)-ROW(J2),0))*(H2:H100="Cash"))

    ....or if you want to keep the formulas simpler use a helper column to indicate which rows are visible, e.g. in Z2 use this formula

    =SUBTOTAL(3,H2)

    and copy down

    Then the formula for summing visible cash amounts would be

    =SUMIFS(J:J,Z:Z,1,H:H,"Cash")
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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