LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How do add another code to a current one?

I have this following code to make the rows changed based on the critea in
column 16, and I need add A "Red, Yellow, Green" for status to only one
column 30 at the end of the spreadsheet. How do I add another code? I keep
getting an error..

Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range, clr As Long
For Each c In Target.Cells
If c.Column = 16 Then

Select Case c.Value
Case "Analyze": clr = RGB(204, 255, 255)
Case "Build ": clr = RGB(204, 255, 255)
Case "PDP": clr = RGB(204, 255, 255)
Case "Pending Requirements Review": clr = RGB(204, 255, 255)
Case "Requirements Verified": clr = RGB(204, 255, 255)
Case "Testing": clr = RGB(204, 255, 255)
Case "Installed-In Production": clr = RGB(201, 153, 255)
Case "In-Progress Pending Verification": clr = RGB(201, 153,
255)
Case "Cancelled": clr = RGB(128, 0, 0)
Case "On-Hold": clr = RGB(255, 255, 153)
Case "On-Hold Pending Resource": clr = RGB(255, 255, 153)
Case "On-Hold Pending Requirements": clr = RGB(255, 255, 153)
Case Else: clr = RGB(255, 255, 255)
End Select

With c.EntireRow.Cells(1).Resize(1, 26)
.Interior.Color = clr
End With

End If
Next c
End Sub

 
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
VBA code relative to current date Jbm Excel Programming 5 July 29th 09 06:43 PM
code that searches for current date J.W. Aldridge Excel Programming 3 October 3rd 07 06:04 PM
Referencing code outside of current sheet nemadrias Excel Programming 2 June 29th 06 08:26 PM
Code for current sheet selected... Brad Excel Programming 3 March 11th 05 04:29 PM
My current code Ben_2004[_2_] Excel Programming 5 May 2nd 04 09:31 PM


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

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"