Identify 6th working day out of 7 consecutive working days

Angel_n

New Member
Joined
Sep 15, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi All,
Please help!
I need a formula to identify any 6th and 7th working days out of 7 working days for F column. So if an employee works on 6th and 7th day need to pay overtime in P column.
However, if skipping one day on 7 working days, the next working day will be counted minus 1. Sorry if it is confusion, below is an example if an employee does not work on that 4th day, it would not be counted. 7th working day will be come day 6 to be paid overtime.


1694753971393.png
 

Attachments

  • 1694753645156.png
    1694753645156.png
    66.5 KB · Views: 3

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hope this helps
Book3
ABC
1AttendanceDateWorking Days
2W9/15/20231
3W9/16/20232
4W9/17/20233
5W9/18/20234
6W9/19/20235
7O9/20/2023 
8O9/21/2023 
9W9/22/20231
10W9/23/20232
11W9/24/20233
12W9/25/20234
13W9/26/20235
14W9/27/20236
15W9/28/20237
16O9/29/2023 
17O9/30/2023 
18W10/1/20231
19W10/2/20232
20W10/3/20233
21W10/4/20234
22W10/5/20235
Sheet1
Cell Formulas
RangeFormula
C2:C22C2=IF(A2="w",IFERROR(IF(C1>=7,1,C1+1),1),IF(A2="O","",IF(C1>7,1)))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C2:C22Expression=OR(C2=6,C2=7)textNO
 
Upvote 1
Hi Armstrong, thanks a lot.

However, actually I would like to find any 6th or 7th shift in any 7 days (no need consecutive working days)
Below highlighted yellow is the desired result, when there is a non-working day in between, it is still counted within any 7 days but not counted to find 6th or 7th shift.

SOrry about the earlier confusion. Hope you could help!

1694994778879.png
 
Upvote 0
this works?
Book1
ABC
1AttendanceDateWorking Day
2W9/15/20231
3W9/16/20232
4W9/17/20233
5W9/18/20234
6W9/19/20235
7O9/20/2023 
8O9/21/2023 
9W9/22/20236
10W9/23/20231
11W9/24/20232
12W9/25/20233
13W9/26/20234
14W9/27/20235
15W9/28/20236
16O9/29/2023 
17O9/30/2023 
18O10/1/2023 
19W10/2/20231
20W10/3/20232
21W10/4/20233
22W10/5/20234
Sheet3
Cell Formulas
RangeFormula
C2:C22C2=IF(A2="W",IFERROR(IF(C1=6,1,C1+1),(IF(MAX($C$1:C1)+1>6,1,MAX($C$1:C1)+1))),"")
 
Upvote 0

Forum statistics

Threads
1,215,360
Messages
6,124,491
Members
449,166
Latest member
hokjock

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