+ Reply to Thread
Results 1 to 14 of 14

Subtotal Count Of Help

  1. #1
    Registered User
    Join Date
    09-26-2014
    Location
    Houston,TX
    MS-Off Ver
    Excel 2010
    Posts
    19

    Subtotal Count Of Help

    Hello,

    I am trying to get a formula working but have been having difficulities producing the desired results. I am wanting a subtotal formula (so that I can filter) that will give me a # value when Column I has a value of "Win" and Column O has an amount greater than 0. I would also like to have this formula ignore a result when Column O is blank. My data range starts in Row 12 and I plan on making it a dynamic range due to future entries. Any help would be greatly appreciated!

    To help better illustrate what I am looking for:

    Column I Column O

    Win 5
    Loss -12
    Win 7
    Win 8
    Win
    Loss -1

    In this example, I would want my formula to exclude the Win with a blank value in column O, resulting in a desired total of "3" .
    Last edited by swoosh1014; 10-13-2014 at 04:43 PM.

  2. #2
    Registered User
    Join Date
    01-23-2013
    Location
    Chennai, Tamil Nadu
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: Formula Help

    in cell I10, enter the below formula.

    =SUBTOTAL(9,$O$12:$O$10000).

    so, when you filter Column I with Win or Loss cell I10 results sum of winning of losing numbers in Column O.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,884

    Re: Formula Help

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely 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 will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Formula Help

    Until later
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    09-26-2014
    Location
    Houston,TX
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Formula Help

    Thanks for the reply! I think I may have explained this a bit poorly, I am wanting a subtotal of the total count of results that match these criteria. So in the example I listed above, there are 3 results that qualify, and I woud want my formula to result in a "3".

  6. #6
    Valued Forum Contributor
    Join Date
    01-19-2012
    Location
    Barrington, IL
    MS-Off Ver
    Excel 2007/2010
    Posts
    1,211

    Re: Count of Subtotal Help

    Try something like

    =COUNTIFS(I1:A100,"w",O1:O100,">"&0)

    Or

    =COUNTIFS(A6:A12,"w",B6:B12,"<>"&"")
    You should hit F5, because chances are I've edited this post at least 5 times.
    Example of Array Formulas
    Quote Originally Posted by Jacc View Post
    Sorry, your description makes no sense. I just made some formula that looks interesting cause I had nothing else to do.
    Click the * below on any post that helped you.

  7. #7
    Registered User
    Join Date
    09-26-2014
    Location
    Houston,TX
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Count of Subtotal Help

    Thanks for the reply!

    I entered this formula based on my current range, and received a Value error...

    =COUNTIFS(I12:I121,"W",O12:O1221,"<>"&"")

    Any suggestions? Sorry I am still an Excel newbie... Will a COUNTIFS formula work with multiple filters or would I need a Subtotal formula in order to do that?

  8. #8
    Registered User
    Join Date
    09-26-2014
    Location
    Houston,TX
    MS-Off Ver
    Excel 2010
    Posts
    19

    Subtotal Count Of Help

    Figured out why I am getting the value error, however when I filter, my result is not changing like I need.
    Last edited by swoosh1014; 10-13-2014 at 04:44 PM.

  9. #9
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Subtotal Count Of Help

    Yep, countifs (and most all other functions) don't care if the column has been filtered or not.
    They read all the cells regardless if they are visible or not.

    The exception is Subtotal (and aggregate in XL2010+)

    I'd suggest a helper column in say Z
    In Z12 and filled down put

    =SUBTOTAL(103,O12)
    Filled down to the end of the data

    Now you can update your countifs to
    =COUNTIFS(I12:I1221,"W",O12:O1221,"<>"&"",Z12:Z1221,1)

  10. #10
    Registered User
    Join Date
    09-26-2014
    Location
    Houston,TX
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Subtotal Count Of Help

    Thanks Jonmo!

    I created the helper column and then I entered the following and received an error

    =COUNTIFS(I12:I121,"Win",O12:O121,"<>"&"AF12:AF121,1)

    It is highlighting the ""AF121 as well as after the last ) .

  11. #11
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Subtotal Count Of Help

    You're missing a quote and comma

    =COUNTIFS(I12:I121,"Win",O12:O121,"<>"&"",AF12:AF121,1)

  12. #12
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Subtotal Count Of Help

    Actually, we don't need the test in countifs for column O <> ""
    Because now subtotal is doing it. (Assuming the subtotal you put in column AF is referring to column O)

    So you can just have
    =COUNTIFS(I12:I121,"Win",AF12:AF121,1)

  13. #13
    Registered User
    Join Date
    09-26-2014
    Location
    Houston,TX
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Subtotal Count Of Help

    I sure was... Thank you so much!!!! This has been driving me crazy for days now and it looks like this will work.

    One other question if you dont mind... currently my data range ends at 121, however I plan on adding on to this for many years into the future. If I copy my helper column all the way down, I am no longer able to insert new rows between my the current last row of data (Row 121) and Subtotal formulas I have built in on Rows 122/123. Is there a way that when I add a row to enter new data, that the helper column I set up can automatically have that formula already entered in the new row, helper column cell so that I dont have to keep copying it in manually every time a new row is added? (Hope that made sense )

  14. #14
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Subtotal Count Of Help

    Take advantage of tables.

    Highlight the ENTIRE dataset
    Click Insert - Table

    Now anytime data is added to a column adjescent to the column with the formula, that formula will be auto filled down.

+ 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. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  2. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 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