Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Multiple Contional Formatting
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 |
#2
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to select multiple text boxes in excel for formatting | New Users to Excel | |||
Eliminate formatting dulication in multiple worksheets | Excel Worksheet Functions | |||
Copy conditional formatting across multiple rows? | Excel Discussion (Misc queries) | |||
background formatting across multiple cells | Excel Discussion (Misc queries) | |||
How do I use conditional formatting for multiple rows? | Excel Worksheet Functions |