Only weekdays (sysgulv)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a formula that only allow weekdays (monday to friday)
and not saturday and sunday in a cell.

You can write monday, but not saturday in the cell.

please help
 
Do you mean that weekday names (e.g. "Monday") will be entered in the
cell or dates (e.g. 6/22/2006) and you want to exclude weekend dates?
 
You can use Data Validation. In a separate area use 5 consecutive
cells to enter weekday names. Name the range weekdays.

Select the cells you want to restrict entry to, then meny
Data>Validation... Choose List. In the box for the range enter
weekdays. Play a little bit with the dialog box, to also specify the
warning and error messages.

HTH
Kostis Vezerides
 
Use Data Validation, with the "list" option, and use

Monday,Tuesday,Wednesday,Thrusday,Friday

as your list. Check the "use in-cell dropdown" option for easy entering...
 
Systemgulv said:
I meen entering weekday names in the cell.

vezerid skrev:

Data validation using a List that contains only Monday, Tuesday,..., Friday
would be one approach, but data validation doesn't prevent PASTING invalid
data into cells.

If you mean a formula validity check, to check the entry in cell A1 try

=ISNUMBER(MATCH(A1,{"Monday","Tuesday","Wednesday","Thursday","Friday"},0))

which will return TRUE if A1 contains a workday name and False otherwise.
You might want to be slightly more generous and use

=ISNUMBER(MATCH(TRIM(A1),
{"Monday","Tuesday","Wednesday","Thursday","Friday"},0))

which would allow arbitrary leading and trailing spaces.
 
Back
Top