Colour format weekend days ?

S

sma

Hello,

I have date list (e.g. 1st Aug - 30th September), and wish to colour in
Saturdays/Sundays - preferably the whole row, but the cell would do
to.

Please help - Ive been trying to work it out for ages !
Thanks,
Sma
 
R

Ron Rosenfeld

Hello,

I have date list (e.g. 1st Aug - 30th September), and wish to colour in
Saturdays/Sundays - preferably the whole row, but the cell would do
to.

Please help - Ive been trying to work it out for ages !
Thanks,
Sma

Use Conditional Formatting.

Assumption is that the date list is in A1:An

1. Select range you wish to format. e.g. A1:Zn
2. Format/Conditional Formatting/Formula Is: =WEEKDAY($A1,3)>4
(note the '$' before the A)
3. Format to taste.

The formatting will be copied to all the selected cells. Because of the nature
of the reference, it will always refer to the cell in the first column.


--ron
 
S

sma

I am using german excel - could be the root of the problem ;). So,
answer just perfect. Thanks !!
 
S

Stuart

sma said:
Hello,

I have date list (e.g. 1st Aug - 30th September), and wish to colour in
Saturdays/Sundays - preferably the whole row, but the cell would do
to.

Please help - Ive been trying to work it out for ages !
Thanks,
Sma

Set a Conditional Format for the cell.

If the cell is B3, set the formula for the conditional format to be:

=WEEKDAY(B3,2)>5

This will be true at weekends. (WEEKDAY returns a number from 1 to 7
depending on teh day of the week; the "2" means Monday = 1, so Sat and
Sun are 6 and 7.)

Stuart
 
D

David McRitchie

Since the poster would prefer the entire row be colored.
Select B3 (becomes the active cell)
Ctrl+A to select all cells on sheet, with B3 as active cell
Modify the suggested formula so that column B is test
for each cell in the selection.
=WEEKDAY($B3,2)>5
BTW, this will use up 1 Conditional format for each cell in the
selection. Your limit is 3.
 

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