Function Problems

Check Employee Availability by Date and Time in Excel

Tauseeq MagsiTauseeq Magsi Nov 18, 2026 868 views

Question details

Create a schedule checker that returns Yes or No for a selected employee and 30-minute time slot.

Check Employee Availability by Date and Time in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Check a selected employee's workday, shift hours, and days off against a date and time slot.
Observed behavior
Each slot should show Yes when it falls within a scheduled shift and the employee is not off that day; otherwise, it should show No.
Before you start

Gather the employee schedule and days-off dates, and decide how they map to the worksheet columns. Enter dates and times as Excel date and time values rather than text.

Solution 1Recommended

Use COUNTIFS to check each 30-minute slot

Use this example layout to check whether a complete 30-minute slot falls within a scheduled shift on a working day.

The formula checks for a matching employee and weekday, a shift that covers the entire slot, and no matching day off. It assumes shifts start and end on the same day and does not check existing assignments.

Adjust the cell ranges and columns to match your workbook. The example uses weekday numbers from 1 for Monday through 7 for Sunday.

1
Enter the schedule

In columns A through D, enter headers for Employee, Weekday, Shift Start, and Shift End. Add one row per employee and working weekday in rows 2 through 100; use numeric weekdays and Excel time values.

2
List days off

In columns F and G, enter headers for Employee and Date. Add each employee's full day off in rows 2 through 100, using an Excel date value in column G.

3
Enter the slot to check

Enter the selected employee in H2, the slot date in I2, and the slot start time in J2. For additional checks, enter dates and 30-minute slot start times in the rows below and repeat the employee name.

4
Calculate availability

In K2, enter =IF(AND(COUNTIFS($A$2:$A$100,$H2,$B$2:$B$100,WEEKDAY($I2,2),$C$2:$C$100,"<="&$J2,$D$2:$D$100,">="&($J2+TIME(0,30,0)))>0,COUNTIFS($F$2:$F$100,$H2,$G$2:$G$100,$I2)=0),"Yes","No") and fill the formula down for the other slots.

Use COUNTIFS to check each 30-minute slot
Adapt the example to your schedule: This formula treats a day-off entry as a full day off. Overnight shifts, partial days off, and existing bookings require additional logic.
Check schedules in WPS Spreadsheets

Build an Employee Availability Checker in WPS Spreadsheets

Use WPS Spreadsheets to enter shift schedules and days off, then apply a COUNTIFS formula to check 30-minute slots.

  1. 1. Open a spreadsheet: Open WPS Spreadsheets and create a blank workbook, or use Open to select an existing Excel workbook.
  2. 2. Set up the schedule: In columns A through D, enter Employee, Weekday, Shift Start, and Shift End, with schedule data in rows 2 through 100. Use 1 for Monday through 7 for Sunday.
  3. 3. Add days off and slot details: Enter employee names and days-off dates in columns F and G. Enter the employee, slot date, and slot start time in H2, I2, and J2.
  4. 4. Check the slot: Enter =IF(AND(COUNTIFS($A$2:$A$100,$H2,$B$2:$B$100,WEEKDAY($I2,2),$C$2:$C$100,"<="&$J2,$D$2:$D$100,">="&($J2+TIME(0,30,0)))>0,COUNTIFS($F$2:$F$100,$H2,$G$2:$G$100,$I2)=0),"Yes","No") in K2. Fill it down after adding more slot details in columns H through J.
Check each 30-minute slot against shift hours and days offOpen and save Microsoft Excel XLSX workbooksUse familiar worksheet formulas and cell referencesCreate and edit spreadsheets with a free office suite
microsoft office alternative - wps office

Frequently Asked Questions

How does the formula check whether the employee works on that day?

WEEKDAY(I2,2) converts the slot date into a number from 1 for Monday to 7 for Sunday. COUNTIFS compares that number and the employee name with the schedule in columns A and B.

Does the entire 30-minute slot have to fit within the shift?

Yes. The shift must start no later than the time in J2 and end at or after J2 plus 30 minutes.

How do I mark an employee as unavailable for a day off?

Add the employee's name in column F and the day-off date in column G. A matching name and date makes the formula return No for that day.

Can this formula handle overnight shifts?

Not as written. It assumes the shift starts and ends on the same day. Overnight shifts need additional date-aware logic, and partial days off or existing bookings also need separate checks.

Why might a scheduled employee show as unavailable?

Check that the name matches, the weekday number is correct, and the dates and times are real spreadsheet values rather than text. Also check columns F and G for a matching day-off entry.