Weekday data validation problem

C

Christine

Can someone help us write the validation criteria for the
following:

We have a cell named WeekEnding. The format is set to a
long Date (1 September 2004).

If the user enters a date that does not occur on a Sunday,
the error message should occur. The current validation
criteria is:
WeekDay(WeekEnding) <1

The error message comes up even if the user types a valid
Sunday date. The logic of the criteria is probably
obviously wrong, but we can't figure out what to try next!

Thanks in advance,
Christine
 
R

Ron Rosenfeld

Can someone help us write the validation criteria for the
following:

We have a cell named WeekEnding. The format is set to a
long Date (1 September 2004).

If the user enters a date that does not occur on a Sunday,
the error message should occur. The current validation
criteria is:
WeekDay(WeekEnding) <1

The error message comes up even if the user types a valid
Sunday date. The logic of the criteria is probably
obviously wrong, but we can't figure out what to try next!

Thanks in advance,
Christine

Your logic is inverted. Try:

=WEEKDAY(WeekEnding)=1


--ron
 
M

Myrna Larson

In addition to you inverted logic, you should note that the WEEKDAY function
with only 1 argument (the date) returns a number between 1 and 7. So the
result will NEVER be < 1.
 

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