Hi,
This is my first thread, and I have been looking around on this forum for an answer but haven't really found one that suits my needs.
I have a list of employees and the dates they have been on sick leave. I would need a formula that calculates the occurrences of consecutive dates to be able to distinguish how many sick periods the employee has had. Column A = Names of employees. Column B = dates they have been sick.
John 2016-01-02
John 2016-01-03
John 2016-02-15
John 2016-03-05
John 2016-03-06
Mike 2016-02-03
Mike 2016-02-04
Mike 2016-02-05
Keith 2016-03-01
Keith 2016-04-10
In this case I want excel to output (in Column C and D respectively)
John 3
Mike 1
Keith 2.
I found a close solution in this thread: http://www.excelforum.com/showthread.php?t=1075879, but I didn't get it to work in my excel sheet.
I have also tried this formula: =SUMPRODUCT((A2:A2010=D2)*(B3:B2011-B2:B2010=1))+(COUNTIF(A2:A2010;D2)>0)
Which didn't do the trick at all (don't really know how that one is working at all since I get inconstancies in the output).
Hopefully some kind soul out there can help me!
Thanks in advance,
Bookmarks