worksheet_change

A

aravindvin

Hi

I have attached the excel with code.

Based on the drop down list change in column G and H, the values i
C,D,E & F will change from 1 through 5.

Based on the numberic value in C,D,E & F, the color in it should chang


You should be able to set different colors for values = 1,2,3,4,5.

NOTE: Currenlty only cells in C are changing if the number in i
changes to 1,2, or 3. Other cells in D,E and F columns do not chang
despite the change in their values.

Let me know the solution !!!!

===================
Private Sub Worksheet_Change(ByVal Target As Range)

Dim icolor As Integer

If Not Intersect(Target, Range("C:F")) Is Nothing Then
Select Case Target
Case 0
icolor = 2
Case 1
icolor = 56
Case 2
icolor = 22
Case 3
icolor = 27
Case 4
icolor = 4
Case 5
icolor = 10
Case Else
icolor = 2
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub
=================

Attachment filename: colortest v9.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=66020
 
B

Bob Phillips

See previous post.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top