How to show current remaining working days according to roster

Copper Contributor

I have roster that shows 3 Employees complete month shift. What formula will show the working days left as the days get over.  I mean the working days left should automatically remove the Offs based on the roster and only show remaining Working days under the working days sectionno matter what shift they are doing .. only Offs should be removed from the total days as the days pass by.

IMG-20231001-WA0009.jpg

2 Replies

@BerlyLinkinI'm not entirely sure if I've grasped the question correctly!.

 

 

 

=1+(Enddate-StartDate)-COUNTIF(C4:AG4,"O")

 

 

SanthoshKunder_0-1696234008267.png

 

@BerlyLinkin 

There are a few reasons it is better to attach a workbook with sample data to a post (or post it to OneDrive, Google Drive, etc.) than to include a picture of it, including:

 

  • Community members trying to assist you do not have to enter and possibly format your sample data to experiment with solutions to your problem.
  • For pictures that capture large views, it is easier to read the workbook than to read the reduced-in-size picture.
  • Community members can view the formulas, conditional formatting, etc., that result in the visual display, and thereby reduce uncertainty as to the worksheet's structure and/or your intent or assumptions.

I don't know if your End date value (as expressed in cell E2) controls the number of days shown on your chart, or if the chart has a "fixed" maximum number of days shown at once.  More importantly, I don't know if your chart has a column D date that is manually entered, or if that date is taken from the "Today" value in cell E1, or is determined in some other way.  (The second case seems less likely, as it would seem to require manual deletion of column data each time you advanced the "Today" value.)


So in my attached workbook, I assumed that D3 contained a manually entered date, and that the chart is built for a variable number of days, based on D3 and E2 (up to a maximum of 31).


My formula for row 5's Working Days Left is thus:

=COUNTIFS(D5:AH5, ">.", D5:AH5, "<>O", D$3:AH$3, ">="&$E$1)

The comparison to a period is intended to ignore any possible blank cells (expected at the far right).  The comparison to O ignores days off.  The third comparison ignores days in the past, i.e., before "Today".


So manually modify the "Today" value and observe the changes in Working Days Left.  The corresponding date's data is "highlighted" between red vertical borders.