How to set elegible appoinment dates, skipping weekends and holidays in EXCEL 365

Amin 40 Reputation points
2026-08-09T10:23:45.4866667+00:00

I want to set up a formula to allow days that can be booked for appointment, in any case a date was a weekend or one of our national g=holidays it wont be available. for the year it should shouw when appointment can happen or when a date is pciked or enterwed it says not elegible

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

Answer accepted by question author
Ruby Nguyen 1,965 Reputation points Independent Advisor
2026-08-09T14:50:11.51+00:00

Good day Amin

Thank you for sharing your concern.  

Excel 365 can support this scenario by combining a holiday list with built-in working day functions. 

Option 1: Display whether an appointment date is eligible 

Use this method if users enter or select a date and you want Excel to indicate whether that date is available for booking. 

Create a list of national holidays in a separate range, for example H2:H30. 

Enter or select the appointment date in A2. 

In another cell, enter the following formula: 

=IF(NETWORKDAYS(A2,A2,$H$2:$H$30)=1,"Eligible","Not Eligible")

User's image

Eligible indicates that the selected date is a valid working day. 

Not Eligible indicates that the date falls on a weekend or matches a holiday in the holiday list. 

This works because the NETWORKDAYS function counts only working days and automatically excludes weekends and any dates listed in the holiday range. 

Option 2: Prevent users from entering invalid appointment dates 

Use this method if you want Excel to reject dates that fall on weekends or holidays. 

Create a list of national holidays in a separate range, for example H2:H30. 

Select the appointment date entry cell, such as A2. 

Open the Data tab and select Data Validation. 

Under the Settings tab: 

Set Allow to Custom. 

Enter the following formula: 

=IF(A2="",TRUE,IFERROR(LET(d,IF(ISNUMBER(A2),INT(A2),DATE(VALUE(RIGHT(A2,4)),VALUE(MID(A2,4,2)),VALUE(LEFT(A2,2)))),NETWORKDAYS(d,d,$H$2:$H$30)=1),FALSE))

User's image

Open the Error Alert tab. 

Enter a message such as: "This date is not eligible for appointment booking. Please select a working day that is not a weekend or national holiday." 

Select OK to save the validation rule. 

User's image

If a user enters a date that falls on a weekend or holiday, Excel will display the error message and prevent the entry. 

User's image

I hope this information is helpful. If you have any questions or need further support, please don’t hesitate to reach out at any time. 

Thank you for your patience and understanding. 


If the answer is helpful, please click "Yes" and kindly upvote it. If you have any extra questions about this answer, please click "Comment".            

Note: Please follow the steps in the forum documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Oldest

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.