Conditional Formatting Dates

C

Chas2

Help! I have a column showing installation dates being entered as mm/
dd/yy but is formatted to show the date as Monday, February 4, 2008. I
want to have any cell showing "Sunday" to be highlighted in a
different colour. I haven't been able to find a solution forr
conditionally formatting cells that contain "Sunday" Any suggestions?
 
M

Mike H

Select your column of date and then

Format|conditional format|formula is

enter the formula

=WEEKDAY(A1)=1

A1 should be the topmost cell selected. Pick a colour and click OK

Mike
 
C

Chas2

Select your column of date and then

Format|conditional format|formula is

enter the formula

=WEEKDAY(A1)=1

A1 should be the topmost cell selected. Pick a colour and click OK

Mike





- Show quoted text -

Thanks Mike: That works. I changed the value in "WEEKDAY(A1)=1" to 7
to get my conditional format to work for Sunday.
 
D

David Biddulph

Well, Chas, I'm fascinated as to how you get =WEEKDAY(A1)=7 to highlight the
Sunday dates, because for the rest of us it highlights Saturday, and it
needs =WEEKDAY(A1)=1 to highlight Sundays.

Perhaps you're applying =WEEKDAY(A1)=7 to cell A2, rather than to cell A1?
That will muddle through if the dates are consecutive, but you'd find that
your method would go all to rats if you didn't have consecutive dates. I
would recommend that you format the cell based on its own content, rather
than the content of the cell above.
 
C

Chas2

Well, Chas, I'm fascinated as to how you get =WEEKDAY(A1)=7 to highlight the
Sunday dates, because for the rest of us it highlights Saturday, and it
needs =WEEKDAY(A1)=1 to highlight Sundays.

Perhaps you're applying =WEEKDAY(A1)=7 to cell A2, rather than to cellA1?
That will muddle through if the dates are consecutive, but you'd find that
your method would go all to rats if you didn't have consecutive dates.  I
would recommend that you format the cell based on its own content, rather
than the content of the cell above.
--
David Biddulph








- Show quoted text -

Yeah, I see the error. Got it fixed now. I was applying the formula to
A2, not A1 as A1 contained my header for the column. Boy, you guys are
good. Thanks
 

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