Count Individual Occurences that are consecutive for the days of the week

Needtoknow

Board Regular
Joined
Apr 21, 2006
Messages
73
Hi All,
I'm looking for a formula to Count Individual Occurrences that are consecutive for the days of the week

I have a list of names on one tab and I want to look at another tab and do the following:
1.) Count individual occurrences that are consecutive for the days of the week
2.) a new occurrence would be if a day was skipped
3.) do not include holidays and weekends

The data on the first tab is only names:
John Doe
Jane Doe
Billy Doe

The data on the second tab is:
Date EmpNo Employee Name Pay Code Yes/No
17/08/18 123 John Doe Yes
17/08/25 123 John Doe Yes
17/12/21 123 John Doe Yes
17/02/06 123 John Doe Yes

Is there an easy way to do this?
Thanks,
Jim
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Im not sure i understand

Where are your consecutive days. In Date colum on sheet 2
in your example none are consecutive.

Where do you want the output to go?

Are you looking to count

17/01/18 123 John doe
17/01/19 123 John doe
17/01/20 123 John doe
17/01/18 123 Jane doe
17/01/06 123 John doe
17/01/18 123 billy Doe

ie in that example John doe worked 3 consecutive days?
 
Upvote 0
I forgot to mention that I only want the consecutive counts to work if the Pay Code (column) is "Yes"
Also, I need to not include weekends and holidays...
 
Upvote 0
Yes, this seems to be the exact same problem but I can't get Excel to work these formulas....

=SUMPRODUCT(($A$2:$A$203529=S2)*($B$3:$B$203529-$B$2:$B$203528=1))+(COUNTIF($A$2:$A$203529,S2)>0)

{=MAX(FREQUENCY(IF($A$2:$A$203529=$S2,IF($B$3:$B$203529-$B$2:$B$203528=1,ROW($B$2:$B$203528))),IF(($A$2:$A$203529<>$S2)+($B$3:$B$203529-$B$2:$B$203528<>1),ROW($B$2:$B$203528))))+(COUNTIF($A$2:$A$203529,$S2)>0)}
 
Upvote 0
Even when I try to recreate the example that thread, I can't seem to make it work.....weird.
I even copied the data over
 
Upvote 0
id date id consecutive
7 04/01/2010 7 #VALUE !
7 15/01/2010
7 25/01/2010
7 26/01/2010
7 19/02/2010
7 03/03/2010
7 09/03/2010
7 19/03/2010
7 16/04/2010
7 13/05/2010
7 22/06/2010
7 23/06/2010
7 10/07/2010
7 16/07/2010
7 26/07/2010
7 07/08/2010
7 12/08/2010
7 21/08/2010
7 04/09/2010
7 07/09/2010
7 08/09/2010
7 09/09/2010
7 05/10/2010
7 21/10/2010
7 05/11/2010
7 13/11/2010
10 14/11/2010




=SUMPRODUCT(($A$2:$A$28=$D2)*($B$3:$B$29-$B$2:$B$28=1))+(COUNTIF($A$2:$A$28,$D2)>0)
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top