Day of week question

  • Thread starter Thread starter ckerns
  • Start date Start date
C

ckerns

I have a monthly time sheet. Each sheet represents a week of the
month. An initial date is entered and the rest of the dates for the
month fill in.

I am trying to verify that the date is actually a Sunday. J4 is
custom formatted as "mmmm" and displays correctly based on the date
entered. This is the formula I am using, but it always returns false.


=IF(AND(J4<>"Sunday", J4 <> ""), "Error! The date you entered is not
a Sunday", "")

Is there a way to do this?


tia

jp
 
=if(weekday(j4)=1,"Sunday","Not a Sunday")

or

=if(text(j4,"dddd")="Sunday", ....

(You meant dddd not mmmm, right?
 

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

Back
Top