+ Reply to Thread
Results 1 to 6 of 6

Countif in date interval

  1. #1
    Registered User
    Join Date
    03-14-2016
    Location
    Oslo
    MS-Off Ver
    2013 Student Package
    Posts
    47

    Countif in date interval

    Hi,

    Issue:
    The input comes from a list in our CRM system. How can I count in between a date interval in this example?
    As an example I want to calculate how many days they where online in between 01.10.2018-31.10.2018? (The correct answer is of course 10 here)

    Do anyone have a formula for this? I only want to count in month.
    Do I have to transform the date cell first before I can count it? In that case, how?

    The input is like this:
    06.02.2018 13.00.01
    07.03.2018 14.59.50
    09.05.2018 10.27.22
    22.06.2018 13.55.18
    22.06.2018 14.07.18
    30.07.2018 08.55.28
    18.09.2018 12.59.21
    17.10.2018 14.31.21
    31.10.2018 12.25.25
    31.10.2018 12.26.58
    31.10.2018 12.28.42
    31.10.2018 12.30.39
    31.10.2018 12.33.04
    31.10.2018 12.34.47
    31.10.2018 12.36.16
    31.10.2018 12.38.00
    31.10.2018 13.23.10
    13.11.2018 13.40.16
    29.12.2018 19.55.46

    Thanks for all help!

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: Countif in date interval

    There a few routes you could take, one might be:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    you can modify the above to do a between range:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    where B1 holds 01-Oct and B2 holds 31-Oct

  3. #3
    Registered User
    Join Date
    03-14-2016
    Location
    Oslo
    MS-Off Ver
    2013 Student Package
    Posts
    47

    Re: Countif in date interval

    Quote Originally Posted by XLent View Post
    There a few routes you could take, one might be:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    you can modify the above to do a between range:

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    where B1 holds 01-Oct and B2 holds 31-Oct
    Thanks a lot!!

  4. #4
    Registered User
    Join Date
    03-14-2016
    Location
    Oslo
    MS-Off Ver
    2013 Student Package
    Posts
    47

    Re: Countif in date interval

    Hmm.
    I manage do do it in October.
    But when when i try to it for example for June it does not work.
    What do I do wrong?

    =SUMPRODUCT((SUBSTITUTE(LEFT(A1:A19,6),".","-")+0>=B1)*(SUBSTITUTE(LEFT(A1:A19,6),".","-")+0<=B2))

    B1 = 1-June
    B2 = 31 June

  5. #5
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: Countif in date interval

    The reference to 10 in the LEFT function is telling XL how many characters to look at in the strings in Column A (it then converts these to a date value courtesy of +0), it is not related to the month #

    so, if you change your references above to 6 back to 10 it should work ok.

  6. #6
    Registered User
    Join Date
    03-14-2016
    Location
    Oslo
    MS-Off Ver
    2013 Student Package
    Posts
    47

    Re: Countif in date interval

    Thanks!
    Now it worked fine.

+ 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] Isolate the datalines based on a given date within a date interval
    By mr_jules in forum Access Tables & Databases
    Replies: 4
    Last Post: 12-01-2016, 06:13 AM
  2. Replies: 4
    Last Post: 11-26-2014, 09:22 PM
  3. Replies: 1
    Last Post: 04-29-2014, 04:42 AM
  4. use of countif formula to calculate time intervals eg.15 min interval
    By sachin kokitkar in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-25-2013, 10:32 AM
  5. Countif to Count Activities in a time interval on a Specific Date
    By rajxkumar in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 12-28-2011, 03:55 PM
  6. Date Interval
    By shers in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-21-2008, 02:03 AM
  7. counting values within given interval - countif?
    By A_F in forum Excel General
    Replies: 4
    Last Post: 05-06-2005, 06:06 AM

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