View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Changing the colour of a range of cells, some with formulas.

If you don't understand the WEEKDAY function, type the word WEEKDAY into
Excel help.

Secondly, you need only one cell reference in the CF formula condition, not
a range. You will also need to understand the difference between absolute
and relative addressing (which again can be found in Excel help). If you
are trying to format the range A3:L40 based on the content of row 3 in each
column, highlight the range, and if you've got A3 as the active cell, use
the CF/ Formula Is condition =WEEKDAY(A$3,2)5
If you look in other columns and other rows, you will see that each cell's
CF condition will now be referencing the row 3 cell for the relevant column.
--
David Biddulph

"Champ" wrote in message
...
Thanks Pete, this almost works but by referencing the whole sheet with
this
condition turns all cells grey, except for the actual dates that are not
weekend. I don't understand what the ",2" & "5" means. The conditional
format I'm using is: =WEEKDAY($A$3:$L$40,2)5, and the cells with the
dates
in them are in row 3.
Thanks in advance.
Champ

"Pete_UK" wrote:

You would use conditional formatting to do this - available from the
format menu. You need to choose Formula Is rather than Cell Value Is
in the first box of the pop-up, and then enter this formula:

=WEEKDAY(cell_ref,2)5

then click on the Format button, select the Patterns tab (for
background colour) and choose grey. Then click OK twice to exit the
dialogue boxes.

Hope this helps.

Pete

On Feb 2, 9:31 am, Champ wrote:
Hi there

I'm hoping someone can assist me. I am wanting a range of cells shaded
grey,
one of which includes a formula that specifies its date, and if the
date
falls on a Saturday and Sunday they're to be shaded grey. Some more
information that may help. The workbook contains 4 sheets, one for each
quarter, and for each quarter I want to just have to enter one date i.e
01/03/2009 formatted to 1-Mar-09, the rest of the date specific columns
across the sheet are populated by & simple '=c3+1' formula but then if
that
date is a Saturday and Sunday, I'd like it and several rows below it,
shaded
grey.

Hope this makes sense.
Cheers,
Champ