+ Reply to Thread
Results 1 to 5 of 5

COUNTIFS filtered by month

  1. #1
    Registered User
    Join Date
    08-28-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    COUNTIFS filtered by month

    Hi, great site very helpful community so far, hopefully I can help others one day.
    Today however I need some input on how to get this COUNTIFS to return a single number
    =COUNTIFS(ZI_ENH_TAB!B:B,"PM01",ZI_ENH_TAB!CS:CS,MONTH(1)) what I am trying to achieve is to count the number of "PM01" values returned in column B but only for a given calendar month from the list of dates in column CS. the count of specific values in column B I can get right, it is counting that value only by the specified month I am having trouble with??

    Please see attached sample sheet.

    Kind regards

    Heath

  2. #2
    Registered User
    Join Date
    08-28-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: COUNTIFS filtered by month

    Sample attached
    Attached Files Attached Files

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: COUNTIFS filtered by month

    you are trying to find text (Jan) in a value/date (1/9/12)

    i have made some minor modifications to your file, see if this is something you can work with. you can hide the styff i added if you want
    Attached Files Attached Files
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    08-28-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    6

    Thumbs up Re: COUNTIFS filtered by month

    I can work with that, I was hoping to avoid any manual intervention as the intent is to import the data monthly directly from SAP (manually as it will cost us $45K for any custom reports to be generated) Adding in one column will only add a minute or two into the process so I will say thanks!

    I would still love to know how to get the formula to do the date filter automatically for me however? Need to engage my lateral thinking when it comes to these equations...I won't marked as solved just yet as if there is a better way I would love to see it.
    Last edited by HeathWilD; 09-14-2012 at 12:59 AM.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: COUNTIFS filtered by month

    the only "manual" intervention would be for the user to copy the formula in sheet2 col DT down

    also, you could change the forula on sheet1 G12-G23 from

    =COUNTIFS(ZI_ENH_TAB!DT:DT,$E12,ZI_ENH_TAB!B:B,G$11) to
    =COUNTIFS(ZI_ENH_TAB!DT:DT,MONTH($F12),ZI_ENH_TAB!B:B,G$11)
    and do the same for the formulas in col H

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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