LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 36
Default Row colour change on input

On Fri, 23 Jun 2006 05:21:11 -0500, CarolineHedges wrote:

I would like to know how I can get the colour of a row to automatically
change when a certain value is input, or any value at all into that
column.


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 Then
If Target.Column = 1 Then
Select Case Target.Value
Case "g"
Target.EntireRow.Interior.Color = vbGreen
Case "b"
Target.EntireRow.Interior.Color = vbBlue
Case "r"
Target.EntireRow.Interior.Color = vbRed
Case Else
Target.EntireRow.Interior.Color = vbWhite
End Select
End If
End If
End Sub

--
PL
 
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
how do I get cells to automaticly change colour on data input? walltur Excel Worksheet Functions 2 February 4th 08 02:46 PM
change a cell background colour to my own RGB colour requirements Stephen Doughty Excel Discussion (Misc queries) 4 June 16th 06 01:08 PM
Background Colour Depending On Input Macca Excel Discussion (Misc queries) 1 April 30th 06 01:05 AM
Conditional formatting - different cell colour for each year following from user input date? StargateFan[_3_] Excel Programming 20 January 11th 06 07:11 AM
Changing a row colour automatically based on a cell input. Andos Excel Programming 3 July 6th 04 08:11 AM


All times are GMT +1. The time now is 10:31 PM.

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

About Us

"It's about Microsoft Excel"