counting consecutive days worked

jevans

New Member
Joined
May 13, 2006
Messages
12
I need to be able to tell when somebody has worked 5 consecutive days. My workbook records a 1 in the cell that correlates to each day worked. I need to be able to display a warning message when somebody works their 5th consecutive day. i need to stop counting when an empty cell is encountered and then continue counting at the next cell with a 1.

Thanks in advance for your help.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
I don't know how helpful this'll be, but if all you need to know is when five consecutive days have been worked, you could simply sum the values of the given cell and the four cells above it and see if it comes to 5 (you'll most likely want to skip the first four cells in the column). By using this formula along with some conditional formatting, you should be able to highlight any 5th consecutive day worked.
 
Upvote 0
I appreciate your help, but that won't work for this situation. I need to restart counting after I hit a zero or empty cell. I would like to reflect the 5th day warning on a different sheet. Thanks again for the help.
 
Upvote 0
Does this solve your problem?
Excel Workbook
AB
11
211
312
413
5Rest Day
611
712
813
9Rest Day
1011
1112
1213
1314
1415
Sheet1



Regarding the message, would you like to display message in the same column so that when it shows "5" it also displays message along side or do you want it using VB?
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,831
Members
449,051
Latest member
excelquestion515

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