+ Reply to Thread
Results 1 to 3 of 3

Subtotal and Countifs

  1. #1
    Registered User
    Join Date
    09-04-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    2

    Subtotal and Countifs

    Hello! First post here. I've done a lot of searching and I want to post this problem because it is frustrating me.

    I am trying to do a countifs function for instances where a property falls into a specific range of months since acquisition. I want the to use subtotal so that the count function changes according to filters. Getting it to adjust according to various filters is really the key thing I am trying to do.

    The countifs function is:

    =COUNTIFS('Data Tape'!$Q$5:$Q$17662,">="&A7,'Data Tape'!$Q$5:$Q$17662,"<="&C7)

    I can also express it as sumproduct and get the same result:

    =SUMPRODUCT(--('Data Tape'!$Q$5:$Q$17662>=A7),--('Data Tape'!$Q$5:$Q$17662<=C7))

    But when I try to add subtotal, the thing keeps returning 0. Here is the formula I am trying to use:

    =SUMPRODUCT(SUBTOTAL(2,OFFSET(Q$5,ROW('Data Tape'!Q$5:Q$17662)-ROW(Q$5),0,1)),--('Data Tape'!$Q$5:$Q$17662>=A7),--('Data Tape'!$Q$5:$Q$17662<=C7))

    Through trolling similar questions on these forums, I thought I had found the solution. However, I can't get it to work. Any help would be much appreciated. Thanks!

  2. #2
    Registered User
    Join Date
    09-04-2013
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Subtotal and Countifs

    I solved the problem by adding named ranges to organize things better and letting the workbook recalc all the way through. Too often I get impatient and just do Shift + F9 instead of F9.

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Subtotal and Countifs

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    http://www.mrexcel.com/forum/excel-q...mproducts.html
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ 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. Subtotal for countifs function
    By guyzk1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-02-2013, 04:39 PM
  2. COUNTIFS OR...multiple countifs without duplication in the numbers
    By HooligaD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-21-2012, 09:53 AM
  3. 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
  4. Replies: 0
    Last Post: 12-16-2011, 09:01 AM
  5. Replies: 1
    Last Post: 03-21-2011, 01:39 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