View Single Post
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Excel97?

If so, set a cell to point at the DD cell, and test that in the Calculate
event

Private Sub Worksheet_Calculate()
Dim icolor As Integer
With Worksheets("Sheet1").Range("H1")
Select Case .Value
Case "jhe"
icolor = 6
Case "mikoy"
icolor = 22
Case "mik"
icolor = 7
Case "gina"
icolor = 53
Case "gary"
icolor = 15
Case "fen"
icolor = 42
Case Else
'Whatever
End Select
.Interior.ColorIndex = icolor
End If
End Sub


--
HTH

Bob Phillips

"Conditional Formatting"
wrote in message ...

MY PROBLEM IS THAT I used drop down when i select the name jhe the color
does not change please help.

If you could give me other macro I would appreciate it.
Thanks


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("A1:c10")) Is Nothing Then
Select Case Target
Case "jhe"
icolor = 6
Case "mikoy"
icolor = 22
Case "mik"
icolor = 7
Case "gina"
icolor = 53
Case "gary"
icolor = 15
Case "fen"
icolor = 42
Case Else
'Whatever
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub