Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Changing the colour of a range of cells, some with formulas.

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Changing the colour of a range of cells, some with formulas.

Conditional formatting, using the WEEKDAY function.
Info on both is available in Excel help.
--
David Biddulph

"Champ" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Changing the colour of a range of cells, some with formulas.

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


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Changing the colour of a range of cells, some with formulas.

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



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Changing the colour of a range of cells, some with formulas.

I presume you mean that your dates are in column 3, rather than row 3.

Highlight the range A3:L40, starting from A3 (so that it is the active
cell), then click on Format | Conditional formatting. Choose Formula
Is, and then enter this formula:

=WEEKDAY($C3,2)5

Click on the Format button and then choose grey in the Patterns tab,
then click OK twice to exit. Excel will automatically adjust that cell
reference to suit each row in the highlighted area, and each row will
refer to column C (hence the $C3). This will turn the row from A to L
grey if the date in C is a weekend.

WEEKDAY(cell,2) returns numbers 1 to 7, where 1 = Monday, 2 = Tuesday,
6 = Satuday, 7 = Sunday, etc., so if you are looking for weekends you
want values greater than 5.

Hope this helps.

Pete



On Feb 2, 12:26*pm, Champ wrote:
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- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Changing the colour of a range of cells, some with formulas.

You've been a great help. Excel help is useful when you know what you're
looking for.
Cheers.

"David Biddulph" wrote:

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





  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default Changing the colour of a range of cells, some with formulas.

Thank you Pete, and I did mean row 3, not column 3. It's all good though,
cheers.

"Pete_UK" wrote:

I presume you mean that your dates are in column 3, rather than row 3.

Highlight the range A3:L40, starting from A3 (so that it is the active
cell), then click on Format | Conditional formatting. Choose Formula
Is, and then enter this formula:

=WEEKDAY($C3,2)5

Click on the Format button and then choose grey in the Patterns tab,
then click OK twice to exit. Excel will automatically adjust that cell
reference to suit each row in the highlighted area, and each row will
refer to column C (hence the $C3). This will turn the row from A to L
grey if the date in C is a weekend.

WEEKDAY(cell,2) returns numbers 1 to 7, where 1 = Monday, 2 = Tuesday,
6 = Satuday, 7 = Sunday, etc., so if you are looking for weekends you
want values greater than 5.

Hope this helps.

Pete



On Feb 2, 12:26 pm, Champ wrote:
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- Hide quoted text -


- Show quoted text -



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Changing the colour of a range of cells, some with formulas.

You're welcome - thanks for feeding back.

Pete

On Feb 3, 5:41*am, Champ wrote:
Thank you Pete, and I did mean row 3, not column 3. It's all good though,
cheers.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing all cells in one colour to a different colour Bob Excel Discussion (Misc queries) 3 June 25th 08 02:12 PM
Changing fill colour of cells in a range Paul Hyett[_2_] Excel Discussion (Misc queries) 8 July 14th 07 07:04 PM
Changing font colour in some cells Di W New Users to Excel 4 March 12th 06 05:58 PM
changing the colour of cells depending on the content. johnny.exe Excel Discussion (Misc queries) 3 January 26th 06 09:41 AM
Changing cell colour depending on another cells value... Web master Excel Discussion (Misc queries) 3 January 10th 06 12:30 PM


All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"