+ Reply to Thread
Results 1 to 9 of 9

Count how many rows with a date within the next 7 days

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Count how many rows with a date within the next 7 days

    Hi guys,

    Is there a formula that can count how many rows in column E equal todays date plus 7 days? I know that the below formula counts how many rows have today's date, but I cannot find a formula to count how many rows have a date between today's date (11/11/2014) to 7 days out (12/18/2014).

    =COUNTIF(E:E,TODAY())

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Count how many rows with a date within the next 7 days

    Try this:
    =COUNTIF(E:E,TODAY()+7)
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: Count how many rows with a date within the next 7 days

    I had tried that prior to posting, but for some reason it returns 0. I have 9 dates in column E that have a date between 11/11/2014 to 11/18/2014 so the formula should return a 9.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Count how many rows with a date within the next 7 days

    That would imply that either the Col_E values are not dates....
    or...they include a time component (Example: 12/18/2014 4:48:00 AM).
    Assuming the latter, try this:
    =COUNTIFS(E:E,">="&TODAY()+7,E:E,"<"&TODAY()+8)
    or...if you want a count of dates that are between today and today +7 days, inclusive,
    try this:
    =COUNTIFS(E:E,">="&TODAY(),E:E,"<"&TODAY()+8)
    Does that help?

  5. #5
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: Count how many rows with a date within the next 7 days

    The column E values are definitely dates, and they do not have a time component.

    Capture.JPG

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,243

    Re: Count how many rows with a date within the next 7 days

    How about something like this?

    =COUNTIF(E:E,TODAY()) +COUNTIF(E:E,TODAY()+1) +COUNTIF(E:E,TODAY()+2) +COUNTIF(E:E,TODAY()+3) +COUNTIF(E:E,TODAY()+4) +COUNTIF(E:E,TODAY()+5) +COUNTIF(E:E,TODAY()+6) +COUNTIF(E:E,TODAY()+7)
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  7. #7
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: Count how many rows with a date within the next 7 days

    This works, thanks. I would have thought there would be a simplified version of this?

    =COUNTIF(E:E,TODAY()) +COUNTIF(E:E,TODAY()+1) ++COUNTIF(E:E,TODAY()+2) ++COUNTIF(E:E,TODAY()+3) ++COUNTIF(E:E,TODAY()+4) ++COUNTIF(E:E,TODAY()+5) ++COUNTIF(E:E,TODAY()+6) ++COUNTIF(E:E,TODAY()+7)

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,243

    Re: Count how many rows with a date within the next 7 days

    Hi,

    Ron's formulas above that use the CountIFS() is an easier version.

  9. #9
    Forum Contributor
    Join Date
    10-10-2014
    Location
    New Jersey
    MS-Off Ver
    2010 & 2013
    Posts
    276

    Re: Count how many rows with a date within the next 7 days

    Somehow I had missed your second formula, Ron. It worked beautifully. I never would have thought of it. Thanks so much for the help. +1 for both of you.

    =COUNTIFS(E:E,">="&TODAY(),E:E,"<"&TODAY()+8)
    This thread will be changed to "solved".

+ 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: 4
    Last Post: 04-24-2014, 04:34 AM
  2. How count exact date of 90 days
    By redza in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-12-2013, 02:45 AM
  3. How to count even exact date 90 days
    By redza in forum Excel General
    Replies: 0
    Last Post: 09-12-2013, 02:12 AM
  4. [SOLVED] Count # of Rows between 2 days in 1 column (VBA)
    By Rilly in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-24-2013, 12:24 AM
  5. Replies: 8
    Last Post: 02-08-2013, 04:29 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