Only weekdays (sysgulv)

S

Systemgulv

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
 
V

vezerid

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?
 
V

vezerid

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
 
B

Bernie Deitrick

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...
 
H

Harlan Grove

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top