+ Reply to Thread
Results 1 to 7 of 7

Count Consecutive Days from Today's Date

  1. #1
    Forum Contributor
    Join Date
    02-13-2009
    Location
    Indiana
    MS-Off Ver
    Excel 2015
    Posts
    183

    Count Consecutive Days from Today's Date

    Hello All,

    I have a spreadsheet that contains days that individuals has worked. I want to know how many consecutive days they have worked from today's date.

    I have attached a spreadsheet that I think more clearly shows what I am trying to accomplish.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-23-2015
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    4

    Re: Count Consecutive Days from Today's Date

    Hi,

    you may try this formula.

    COUNTIFS($B$2:$B$10,">7/4/2015",$A$2:$A$10,D2)

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Count Consecutive Days from Today's Date

    I'm struggling to understand your question in light of the uploaded file. The file indicates the answers are Peter 0, John 2 and Mary 0.

    In the data I see Peter has worked 2 consecutive days, John has worked 2 sets of 2 consecutive days and Mary has worked 2 consecutive days.

    I'm confused. Can you clarify?

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Count Consecutive Days from Today's Date

    e2=MATCH(TRUE,INDEX(SMALL(INDEX(($A$2:$A$10<>$D2)*10^10+TODAY()-$B$2:$B$10,0),ROW(INDIRECT("1:"&ROWS($B$2:$B$10))))>ROW(INDIRECT("1:"&ROWS($B$2:$B$10))),0),0)-1
    Try this and copy towards down
    Attached Files Attached Files
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Registered User
    Join Date
    04-22-2014
    Location
    Edmonton, CANADA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Count Consecutive Days from Today's Date

    Peter worked two consecutive days too but the formula didn't calculate it, only did for John who worked in the same dates (01/04/2015 and 02/04/2015)

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Count Consecutive Days from Today's Date

    @ZAHABI
    OP is asked for "how many consecutive days they have worked from today's date"
    Jhon Worked on 5th and 6th which are immediate dates before 7th but

    Peter Worked on 1st and 2nd which are not immediate dates before 7th

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: Count Consecutive Days from Today's Date

    Quote Originally Posted by nflsales View Post
    @ZAHABI
    OP is asked for "how many consecutive days they have worked from today's date"
    Jhon Worked on 5th and 6th which are immediate dates before 7th but

    Peter Worked on 1st and 2nd which are not immediate dates before 7th
    Ahhhh! OK, Siva....thank you for clarifying that point. I didn't interpret as immediately before. I see my error.

+ 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. Formula to Count Consecutive Blank Cells in a Range Depending on Today's Date
    By tophatpete in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-28-2020, 05:12 AM
  2. [SOLVED] How to count 10 consecutive week days
    By rjassal82 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-16-2013, 05:40 AM
  3. Macro Count Days Between Today's Date and Column D
    By Gard5096 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2012, 10:00 PM
  4. [SOLVED] sort by date, show records with only dates less than 30 days from today, and count....
    By pbucc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-22-2012, 12:11 PM
  5. count consecutive negative days
    By pault22 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2010, 08:10 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