Create an Excel Employee Roster With Hour Limits and Random Days Off
Question details
Create a weekly employee roster that respects availability, weekly hour limits, and shift coverage while varying days off.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- An employee scheduler needs to assign shifts for a week using employee and coverage requirements.
- Observed behavior
- The desired roster assigns available employees within their hour limits, covers required shifts, and varies unassigned days between schedules.
List each employee's availability, maximum weekly hours, required days off, shift lengths, and daily staffing requirements. The example below assumes one shift per day; multiple shifts or additional rules require a larger model.
Use Excel Solver to create a randomized weekly roster
Use a binary assignment grid and randomized priorities to find a schedule that meets the specified constraints.
This example uses four employees in rows 3–6 and seven days in columns B–H. A 1 means an employee works that day's shift; a 0 means the employee is off.
Random priorities vary the assignment Solver prefers, but they do not guarantee equally likely schedules or fair days off over time.
Enter employee names in A3:A6, days in B1:H1, shift lengths in B2:H2, and initial zeros in B3:H6. Enter each employee's maximum weekly hours in J3:J6 and minimum days off in K3:K6.
Enter each day's required staff count in B8:H8. Create a matching availability grid in B11:H14, using 1 for available and 0 for unavailable, with employees in the same order as rows 3–6.
In I3 enter =SUMPRODUCT(B3:H3,$B$2:$H$2) and fill down to I6. In B7 enter =SUM(B3:B6) and fill across to H7. In L3 enter =SUM(B3:H3), and in M3 enter =7-K3; fill both formulas down to row 6.
Enter =RAND() in B17 and fill through H20. Copy B17:H20 and use Paste Special > Values to freeze the priorities. In I17 enter =SUMPRODUCT(B3:H6,B17:H20) as the objective.
Open Data > Solver. Set the objective to I17 and select Max; set changing cells to B3:H6. Add constraints B3:H6 = binary, B3:H6 <= B11:H14, I3:I6 <= J3:J6, B7:H7 = B8:H8, and L3:L6 <= M3:M6. Select Simplex LP and click Solve, then keep the solution.
Check the assignments against availability, hours, days off, and coverage before sharing the roster. For another schedule, refill B17:H20 with =RAND(), paste the results as values, and run Data > Solver again.

Build and check a weekly employee roster in WPS Spreadsheet
Use WPS Spreadsheet to randomize employee order, enter assignments, and check weekly hours and daily coverage. Assignments must be reviewed manually against availability and days-off requirements.
- 1. Create the roster: Open WPS Spreadsheet and create a workbook. Enter employee names, maximum hours, availability, days of the week, and required staff counts.
- 2. Randomize employee order: Add a helper column with =RAND() beside each employee. Copy the results and use Paste Special > Values, then select the employee table and sort by the helper column.
- 3. Enter assignments: In the weekly grid, enter 1 for each assigned shift and 0 for each day off. Use the availability information and randomized employee order to guide your choices.
- 4. Check the roster: Use SUMPRODUCT to calculate each employee's hours and SUM to count staff assigned each day. Compare the results with the hour limits and required coverage, then review availability and minimum days off.
- 5. Save the workbook: Choose File > Save As and select XLSX if you need to share the roster with Excel users.

Frequently Asked Questions
How do I enable Solver in Excel?
On Excel for Windows, go to File > Options > Add-ins, select Excel Add-ins in the Manage box, and click Go. Check Solver Add-in and click OK; Solver should then appear on the Data tab.
Does RAND automatically create a valid roster?
No. RAND supplies random values, but it does not enforce availability, hour limits, or coverage. Use Solver constraints or manually check each assignment.
How can I require a minimum number of days off?
For a grid with one shift per day, count each employee's assigned shifts with SUM and limit that count to seven minus the required days off. In Solver, add a constraint comparing the assigned-shift count with that limit.
Why does Solver say it cannot find a feasible solution?
The requirements may conflict: for example, available employees may not have enough permitted hours to cover every shift. Review availability, staffing counts, hour limits, and days-off requirements in the worksheet.




