Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have been sent this little ditty. Apparently it allows you to tur cells a certain colour depending on the value entered in it. Conditional formatting does not only limits you to 3 choices. Can anyone explain it to me & how to get started as I have not used th VB part of Excel much. Many thanks. Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("B7:U29")) Is Nothing Then Select Case Target.Text Case Is = "H" Target.Interior.ColorIndex = 3 Case Is = "M" Target.Interior.ColorIndex = 45 Case Is = "L" Target.Interior.ColorIndex = 6 Case Is = "U" Target.Interior.ColorIndex = 41 Case Is = "N" Target.Interior.ColorIndex = 50 Case Else Target.Interior.ColorIndex = xlNone End Select End If End Su -- GlenS1 ----------------------------------------------------------------------- GlenS18's Profile: http://www.excelforum.com/member.php...nfo&userid=945 View this thread: http://www.excelforum.com/showthread.php?threadid=26270 |