Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Changing a row colour automatically based on a cell input.

Is there a method whereby I can have a input a date in a cell and it will automatically change the row colour? I am tracking a workflow process.

For example,
if I input a date into cell C7, then row 7 would change all cells to be colour 'LIGHT BLUE'.
if I then, input a date into cell D7, then row 7 would change all cells to be colour 'YELLOW'.
if I then, input a date into cell E7, then row 7 would change all cells to be colour 'GREEN'.
etc, etc...

Any ideas on the best way to do this?




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Changing a row colour automatically based on a cell input.


Highlight Row 7
Select Conditional Formatting from the Format menu

Condition 1: Formula Is: =NOT(ISBLANK($E7))
Colour = Green
Condition 2: Formula Is: =NOT(ISBLANK($D7))
Colour = Yellow
Condition 3: Formula Is: =NOT(ISBLANK($C7))
Colour = Light Blue


You'll need to use VBA to get any more Conditional Formats than three.


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Andos" wrote in message
...
Is there a method whereby I can have a input a date in a cell and it will

automatically change the row colour? I am tracking a workflow process.

For example,
if I input a date into cell C7, then row 7 would change all cells to be

colour 'LIGHT BLUE'.
if I then, input a date into cell D7, then row 7 would change all cells to

be colour 'YELLOW'.
if I then, input a date into cell E7, then row 7 would change all cells to

be colour 'GREEN'.
etc, etc...

Any ideas on the best way to do this?






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Changing a row colour automatically based on a cell input.

Yet another way would be to catch events as the Worksheet Changes

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Column
Case 3, 4, 5
If Not (IsEmpty(Cells(Target.Row, 5).Value)) Then
Rows(Target.Row).Interior.ColorIndex = 4
ElseIf Not (IsEmpty(Cells(Target.Row, 4).Value)) Then
Rows(Target.Row).Interior.ColorIndex = 6
ElseIf Not (IsEmpty(Cells(Target.Row, 3).Value)) Then
Rows(Target.Row).Interior.ColorIndex = 8
Else
Rows(Target.Row).Interior.ColorIndex = xlColorIndexNone
End If
End Select
End Sub



--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Andos" wrote in message
...
Is there a method whereby I can have a input a date in a cell and it will

automatically change the row colour? I am tracking a workflow process.

For example,
if I input a date into cell C7, then row 7 would change all cells to be

colour 'LIGHT BLUE'.
if I then, input a date into cell D7, then row 7 would change all cells to

be colour 'YELLOW'.
if I then, input a date into cell E7, then row 7 would change all cells to

be colour 'GREEN'.
etc, etc...

Any ideas on the best way to do this?






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Changing a row colour automatically based on a cell input.

Rob,

Many thanks for that, it works a treat!

Mant thanks!

Steve

"Rob van Gelder" wrote:

Yet another way would be to catch events as the Worksheet Changes

Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Column
Case 3, 4, 5
If Not (IsEmpty(Cells(Target.Row, 5).Value)) Then
Rows(Target.Row).Interior.ColorIndex = 4
ElseIf Not (IsEmpty(Cells(Target.Row, 4).Value)) Then
Rows(Target.Row).Interior.ColorIndex = 6
ElseIf Not (IsEmpty(Cells(Target.Row, 3).Value)) Then
Rows(Target.Row).Interior.ColorIndex = 8
Else
Rows(Target.Row).Interior.ColorIndex = xlColorIndexNone
End If
End Select
End Sub



--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Andos" wrote in message
...
Is there a method whereby I can have a input a date in a cell and it will

automatically change the row colour? I am tracking a workflow process.

For example,
if I input a date into cell C7, then row 7 would change all cells to be

colour 'LIGHT BLUE'.
if I then, input a date into cell D7, then row 7 would change all cells to

be colour 'YELLOW'.
if I then, input a date into cell E7, then row 7 would change all cells to

be colour 'GREEN'.
etc, etc...

Any ideas on the best way to do this?







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
Fill cell colour based on input in another cell Dan Wood[_2_] Excel Worksheet Functions 2 August 20th 09 06:28 AM
How to input pictures automatically based on cell input? bsharp Excel Worksheet Functions 9 May 30th 09 07:16 AM
How do I stop the font from changing colour automatically? Lij Excel Discussion (Misc queries) 1 October 16th 07 05:05 PM
Formula for changing colour of a cell based on Neumeric VALUE Atul Shah Excel Discussion (Misc queries) 2 March 12th 06 07:44 PM
Changing Cell Contents Based Upon User Input BigCheese Excel Programming 1 June 23rd 04 07:09 PM


All times are GMT +1. The time now is 05:13 PM.

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"