Only Weekdays


Highlight the cells

This example shows you how to restrict the data entered to dates that only fall on weekdays (ie not Saturdays or Sundays)
Select the cells you want to apply this restriction to. In this case "C3:C7".
In this example we

alt text

Enter the Criteria

Press (Data Validation) to display the Data Validation dialog box and select the Settings tab.
Select Custom from the Allow drop-down box
Enter the following formula into the formula bar.
=AND(WEEKDAY(C3)<>1,WEEKDAY(C3)<>7)
The WEEKDAY function returns the day of the week for a given date.
It returns the value of 1 when the date falls on Sunday and 7 when it falls on a Saturday.

alt text

Press OK to apply the data validation.


© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext