+ Reply to Thread
Results 1 to 8 of 8

Subtotal with condition

  1. #1
    Registered User
    Join Date
    10-16-2014
    Location
    Bangalore
    MS-Off Ver
    2007
    Posts
    6

    Subtotal with condition

    Hi All,

    I am having an XL file, where I would like to get the subtotal of a particular field based on a condition.

    Please find the below sample file.

    Where I need the Subtotal (Count) of Records where Name = "A". Please note that the for the region filed, i am having a slicer.

    Name Number Region
    A 65 South
    B 73 North
    C 7 West
    A 49 South
    C 59 South
    V 93 North
    A 31 West
    C 76 East
    D 77 East
    S 42 North
    W 40 North

    Regards,
    Manoj

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

    Re: Subtotal with condition

    Try this:

    =SUMIF(A2:A11,"A",B2:B11)

    Hope this helps.

    Pete

  3. #3
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Subtotal with condition

    If you are looking for subtotal after filter then try this :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Or
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    And if you want count in a regular way then :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-16-2014
    Location
    Bangalore
    MS-Off Ver
    2007
    Posts
    6

    Re: Subtotal with condition

    Hi All,

    Thanks for your support.

    But I think, the above solutions will now work for my issue.

    Please find the attachment for your reference.
    Capture.PNG

    I am having a slicer for filtering Region. And after the filter, i need to see the count in that region against each name.

    Thanks!

    Regards,
    Manoj

  5. #5
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,276

    Re: Subtotal with condition

    Assuming your data "A2" to "C12"
    In "A13" mentioned name as "A"
    In "B13" enter below formula :
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you sum with name & region criteria then formula is :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Range "B" is : Number
    Range "A" is : Name
    Range "C" is : Region
    Cell "$A$13" is : A
    Cell "$A$14" is : South

    For Count with two criteria. Kindly remove range as per your requirement from below formula :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Hope for your help.


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  6. #6
    Registered User
    Join Date
    10-16-2014
    Location
    Bangalore
    MS-Off Ver
    2007
    Posts
    6

    Re: Subtotal with condition

    Thanks a lot.

    =SUMPRODUCT(SUBTOTAL(9,OFFSET($B$2,ROW($B$2:$B$12)-ROW($B$2),0)),($A$2:$A$12=$A13)+0) served my purpose.

    If you don't mind, can you please explain the same.


    Regards,
    Manoj

  7. #7
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,276

    Re: Subtotal with condition

    Sumproduct is summing these. And Subtotal only generates these Sums.

  8. #8
    Registered User
    Join Date
    10-16-2014
    Location
    Bangalore
    MS-Off Ver
    2007
    Posts
    6

    Re: Subtotal with condition

    Thank you.....

+ 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] Subtotal based on Cell condition
    By ghostly1 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-18-2016, 10:58 PM
  2. Resolved >>> Subtotal with condition
    By taherno1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-03-2014, 04:21 PM
  3. [SOLVED] Sumproduct, Subtotal with multiple condition
    By ravi.jalani in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-01-2013, 12:18 PM
  4. [SOLVED] Using Subtotal on Filtered Data with an additional condition
    By rau in forum Excel General
    Replies: 15
    Last Post: 09-06-2012, 08:03 AM
  5. Subtotal based on filtered list with more than one condition
    By efernandes67 in forum Excel General
    Replies: 5
    Last Post: 08-22-2012, 04:00 AM
  6. Subtotal condition
    By noodles in forum Excel General
    Replies: 3
    Last Post: 08-13-2009, 02:43 PM
  7. subtotal and if condition
    By bokals in forum Excel General
    Replies: 2
    Last Post: 06-30-2009, 05:13 AM

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