+ Reply to Thread
Results 1 to 7 of 7

How to do COUNTIF with SUBTOTAL

  1. #1
    Registered User
    Join Date
    03-28-2018
    Location
    SAUDI ARABIA
    MS-Off Ver
    10
    Posts
    4

    How to do COUNTIF with SUBTOTAL

    Hi

    in one column i have the values 1 or 2

    to get the count for both i use =SUBTOTAL(2,D2:D158)

    how can i have count for the value 2 only
    Last edited by AliGW; 03-28-2018 at 06:49 AM. Reason: change the title

  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,591

    Re: subtotal

    Welcome to the forum! Please take a moment to re-read forum rule #1 and then amend your thread title to something that better explains your problem. Changing your thread title is not optional, which means you must change it. Thanks!

    • Use concise, accurate thread titles.
    • Your post title should describe your problem, not your anticipated solution.
    • Use terms appropriate to a Google search - poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice tell us nothing.
    • Responding to a request to change your thread title by doing so is mandatory.

    To change a title go to your first post, click EDIT then Go Advanced and change your title.

    No help to be offered, please, until the OP complies with this request.
    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
    Forum Expert kersplash's Avatar
    Join Date
    11-22-2016
    Location
    Perth
    MS-Off Ver
    Home 2016 (Windows 10)/Work 2013 Pro Plus (Windows 10)
    Posts
    2,012

    Re: subtotal

    If you are using a pivot table it you should just apply the required filter.

  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,591

    Re: How to do COUNTIF with SUBTOTAL

    It should not have taken two and a half hours to get you to come up with a meaningful thread title. However, you have now done so and may receive help.

    I have noted your comment (now deleted) about not caring about thread titles: please be advised that further infringements of our rules will be treated seriously and may result in a temporary or permanent ban from these forums.

    Please make sure that you have read the rules before posting again: https://www.excelforum.com/forum-rul...rum-rules.html

  5. #5
    Registered User
    Join Date
    03-28-2018
    Location
    SAUDI ARABIA
    MS-Off Ver
    10
    Posts
    4

    Re: How to do COUNTIF with SUBTOTAL

    You said that all previous clear and deleted , after posting i don't know from where this shown-up .

    Also i read your discussions and you are expert and you know what i need for this formula ,

    Why you don't want to provide me the solution???????? .

  6. #6
    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,591

    Re: How to do COUNTIF with SUBTOTAL

    Someone who can help you will provide you with a solution, hopefully, but you need to be patient. If that person were me, then I would have done so just as soon as you complied with the forum rules. You are batting on a very sticky wicket here: your attitude will not be impressing those who can help, making them less likely to bother dealing with you.

    Please remember that those who help here do so voluntarily and of their own goodwill. They live in many different time zones and many will be out at work right now if they are not asleep on the other side of the globe. This is not a paid 'service': members will help when they are ready and able to do so, and not 'on demand'. Please do not try to put pressure of time on anyone here: if you get the help you need today, that's fine, but you really should not count on it. Thanks for your understanding and patience.

    From the forum rules (link in the main menu above):
    • If your question has not been answered within a day, consider adding another post with any additional information you believe is relevant. If you think your post is good as is, just reply to your own thread with the words "Bump no response", which will bring it to the top of the forum.

  7. #7
    Registered User
    Join Date
    03-28-2018
    Location
    SAUDI ARABIA
    MS-Off Ver
    10
    Posts
    4

    Re: How to do COUNTIF with SUBTOTAL



    Successfully created .

    =SUMPRODUCT(SUBTOTAL(3,OFFSET(D2,ROW(D2:D159)-MIN(ROW(D2:D159)),)),0+(D2:D159=1))

+ 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. Im New...if subtotal exists then remove. if subtotal doesnt exist do nothing
    By ci89 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2015, 04:53 PM
  2. Remove only 1 subtotal layer from Multi Nested Subtotal
    By goawohl in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 10-16-2014, 10:10 AM
  3. need subtotal to also include the matching data in subtotal line
    By baby_kay_2003 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-15-2014, 12:43 AM
  4. Replies: 1
    Last Post: 09-18-2013, 04:10 PM
  5. Replies: 8
    Last Post: 07-31-2012, 09:41 AM
  6. Subtotal - Delete zero Subtotal and prior rows that calculate to that zero Subtotal
    By Whatsherface in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2012, 08:37 PM
  7. Replies: 3
    Last Post: 03-08-2006, 05:25 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