+ Reply to Thread
Results 1 to 14 of 14

Countifs & Dates

  1. #1
    Registered User
    Join Date
    12-21-2018
    Location
    edinburgh
    MS-Off Ver
    2016
    Posts
    15

    Countifs & Dates

    Hello.

    I'm struggling to get over what feels like the simplest of issues. I'm trying to get my formula to count how many calls are logged onto a desk by service within a certain time frame.

    I was using Countifs and I've tried a combination of putting the date in like "=> 31/05/2021", or using the => =< combo in relation to a cell that has a date reference but no matter what it returns a zero, despite knowing there's info there. I even paired it back to just look for how many things were between a set of dates and again, a return to 0

    I've attached my spreadsheet with the last ditch attempt.

    Ideal world I'd like to calculate how many tickets are in Status OPEN, between a weekly date, ie 31/may/2021 to 6th June, and belong to the service desk Hubble.

    I'm using the insert table option for my data. I don't know if that's what's making it not count stuff.

    can you assist?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,181

    Re: Countifs & Dates

    Try

    in B19

    =COUNTIFS(Table2[[Date Logged]:[Date Logged]], ">=" & B$18, Table2[[Date Resolved]:[Date Resolved]], "< " &B$18+7,Table2[[SVD Assigned Name]:[SVD Assigned Name]],"=" &$A19)

    Drag across and down
    Last edited by JohnTopley; 07-20-2021 at 01:40 PM.

  3. #3
    Registered User
    Join Date
    12-21-2018
    Location
    edinburgh
    MS-Off Ver
    2016
    Posts
    15

    Re: Countifs & Dates

    That's picking up some stuff, but not everything

    I can't see why it would only pick up 2 of the SVD.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-19-2021
    Location
    Phoenix, AZ
    MS-Off Ver
    Office 365
    Posts
    7

    Re: Countifs & Dates

    The Names under weekly totals open needed to match the table exactly for his formula. See attached.
    Attached Files Attached Files

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,804

    Re: Countifs & Dates

    Sorry for off-topic interjection:

    Although there is no official rule regarding this behaviour, we request that wherever possible both the question AND the answer be provided in substantive detail here within the thread. An attached workbook is an excellent aid for posing a question and offering a solution, but solely doing that with no in thread explanation makes it difficult for researchers to understand or consider the Q & A of this thread without downloading what may be a pointless doc to them, if they can do that at all. Doing that also hides the content from search engines so others may never benefit from this.

    I'm sure you understand, and we look forward to seeing you post your formulas/macros in your posts for the searching benefit of all.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    12-21-2018
    Location
    edinburgh
    MS-Off Ver
    2016
    Posts
    15

    Re: Countifs & Dates

    I managed to get it working using a different formula:

    it dawned on me for the table i didn't want to count the number of open per SVD i just wanted to count how many tickets were logged to SVD Assigned (not SVD Assigned Name) for each week.

    =(COUNTIFS(Table2[Date Logged], ">=31/05/2021", Table2[Date Logged], "<=06/06/2021", Table2[SVD Assigned], "=HUBBLE BI TEAM"))

    However, both his and mine are not picking up everything. for SEAS AP C & VEN - it's not picking up the entry in Row308 it meets the criteria and if i change it to a different week it's picked up in the week i change it to. So i'm not sure what's going on there
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Countifs & Dates

    It's not efficient to have names in your Calculation sheet different from the names in your Data.

    I have added a column with the correct names in column B, you may hide the column for aesthetic reason.

    Formula for cell C7:
    Please Login or Register  to view this content.
    Formula for cell C19:
    Please Login or Register  to view this content.
    Formula for cell C30:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    12-21-2018
    Location
    edinburgh
    MS-Off Ver
    2016
    Posts
    15

    Re: Countifs & Dates

    Thank you everyone. From tiding up formatting and looking at your formula i've finally managed to get a working version, all the random gremlins are gone too.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    31,181

    Re: Countifs & Dates

    As pointed out previously, the names in column A need to match those in your table.

    Correct names in column A i.e replace with those in B (post #7)

  10. #10
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Countifs & Dates

    loopey83, it's not efficient to hardcode the names and dates in your formulas. Your formulas cannot auto-adjust when you copy to new weeks across or add new names below.

  11. #11
    Registered User
    Join Date
    12-21-2018
    Location
    edinburgh
    MS-Off Ver
    2016
    Posts
    15

    Re: Countifs & Dates

    I can't get the formula to work properly when it's not hardcoded that's the issue.

    So for the table Weekly calls open - I started looking to create the wrong information. I had planned to use this table to see how many open calls per week - but given most of these were closed quickly after opening it wasn't showing me what I wanted.

    So i changed that table to look for only the number of calls logged per SVD assigned (not SVD name)

    For table 2 - I'm wanting to see how many calls were closed that week. the calculation without the dates hard coded worked for the most part but they don't tally up and I can't work out why.

    In total for June (including 31 May as the week begins on that date) there were 531 closed calls. In the spreadsheet you provided it shows 468 closed, so it's not picking up everything.

  12. #12
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Countifs & Dates

    I will look at my formulas again if attached amended file is still not what you want.

    First, some clarifications:

    Table from row 18
    "Weekly totals Open" for week commencing 31-May
    - what is the figures you want to show?
    - [Date Logged] between 31-May and 06-Jun?
    - And, with Status "OPEN"?

    Table from row 29
    Weekly totals closed for week commencing 31-May
    - [Date Logged] between 31-May and 06-Jun?
    - And, with Status "CLOSED"?

    If above are correct, then [Date Resolved] has no place in the formulas.

    Please see amended file attached. I have change from COUNTIFS formulas to SUMPRODUCT formulas.
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: Countifs & Dates

    New formulas used:

    Cell B19:
    Please Login or Register  to view this content.
    Cell B30:
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    12-21-2018
    Location
    edinburgh
    MS-Off Ver
    2016
    Posts
    15

    Re: Countifs & Dates

    That is exactly what I wanted. thank you so much.

    It was starting to drive me a wee bit insane with little bits not working.

+ 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] COUNTIFs between dates
    By swfarm in forum Excel General
    Replies: 3
    Last Post: 03-15-2019, 01:10 PM
  2. [SOLVED] COUNTIFS between 2 dates
    By mikehk in forum Excel General
    Replies: 9
    Last Post: 08-20-2018, 04:06 PM
  3. Countifs counting dates with concurrents dates as one
    By tom8635 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-11-2015, 12:38 PM
  4. [SOLVED] COUNTIFS between 2 dates - how to calculate for blank dates
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-13-2014, 12:03 AM
  5. #VALUE! When using countifs with dates
    By jsgately in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2012, 01:09 PM
  6. Countifs between dates
    By Hleroux in forum Excel General
    Replies: 4
    Last Post: 03-07-2012, 08:27 AM
  7. Replies: 3
    Last Post: 07-19-2010, 01:02 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