Validation - Weekend Or text

J

jnk101

Hi,

I'm trying to validate cell D1 so only weekend dates are approved *or
the text Paid. I have tried this in the custom formula box:

=OR(WEEKDAY(D1,2)>5,D1="Paid")

This accepts weekend dates but for some reason won't accept the tex
Paid.

What am I doing wrong
 
B

Biff

Hi!

The problem is that if D1 = paid (or any text value for that matter), it
causes the WEEKDAY function to error with #VALUE!.

Try this:

=OR(TEXT(D1,"ddd")="Sat",TEXT(D1,"ddd")="Sun",D1="Paid")

Biff
 
B

Bob Phillips

That doesn't work in DV, it errors on input. See Biff's reply for a working
solution.
 
Top