+ Reply to Thread
Results 1 to 4 of 4

Count consecutive dates by person

  1. #1
    Registered User
    Join Date
    05-14-2015
    Location
    Wales
    MS-Off Ver
    Excel
    Posts
    2

    Count consecutive dates by person

    I am putting something together for HR regarding sickness occurrences.

    The data is exported into sheet 2 as:

    A = Task (sickness)
    B = Payroll Number
    C = Date
    so there are multiple entries per person for each date.


    I've tried to put together a formula to count consecutive days sickness per payroll.

    On sheet 1 - I will have a list of every employee in the company in column A
    In Column B i would like the highest total consecutive days sickness they taken from sheet2

    I have attached a basic sheet of what im looking for and working with.
    Many thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-17-2005
    Location
    Canterbury, Kent
    MS-Off Ver
    2003, 2010
    Posts
    285

    Re: Count consecutive dates by person

    Try this array formula

    =MAX(FREQUENCY(IF(Sheet2!$B$2:$B$17=$A2,IF(Sheet2!$D$3:$D$18-Sheet2!$D$2:$D$17=1,ROW(Sheet2!$D$2:$D$17))),IF((Sheet2!$B$2:$B$17<>$A2)+(Sheet2!$D$3:$D$18-Sheet2!$D$2:$D$17<>1),ROW(Sheet2!$D$2:$D$17))))+(COUNTIF(Sheet2!$B$2:$B$17,$A2)>0)

    Confirm with ctrl+shift+enter

    Windy

  3. #3
    Registered User
    Join Date
    05-14-2015
    Location
    Wales
    MS-Off Ver
    Excel
    Posts
    2

    Re: Count consecutive dates by person

    This is fantastic thank you!
    Done the trick.

  4. #4
    Forum Contributor
    Join Date
    03-17-2005
    Location
    Canterbury, Kent
    MS-Off Ver
    2003, 2010
    Posts
    285

    Re: Count consecutive dates by person

    Glad I could help

    Windy

+ 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: 17
    Last Post: 02-14-2024, 07:07 AM
  2. Count consecutive dates as one
    By squirrellydw in forum Excel General
    Replies: 7
    Last Post: 04-06-2017, 05:48 PM
  3. Count and list dates that appears per person
    By Smally in forum Excel General
    Replies: 7
    Last Post: 09-01-2014, 10:52 AM
  4. Count of consecutive dates as single occasion per patient
    By mallen91693 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-04-2014, 01:32 AM
  5. Count consecutive dates only
    By mjbuhr@umich.edu in forum Excel General
    Replies: 0
    Last Post: 05-04-2006, 11: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