Highlights
Waha
In the worksheet module put the following code
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range
Select Case Target.Valu
Case "Brand1
Target.Interior.ColorIndex =
Case "Brand2
Target.Interior.ColorIndex =
Case "Brand3
Target.Interior.ColorIndex =
Case "Brand4
Target.Interior.ColorIndex =
Case "Brand5
Target.Interior.ColorIndex =
Case Els
Target.Interior.ColorIndex = xlNon
End Selec
End Su
You may want to modify the colorindex values to suit. Note also that this is case sensitive. Brand1 will work, but brand1 will not
Ton
----- Wahab wrote: ----
I want to Highlight more than five brand name with
different colors in my complete workbook. Lets say when I
type Brand1 it will make the cell background in Red, for
Brand2 = Green, Brand 3=Blue, Brand4=Pink and Brand 5 =
DarkRed. How I will write the code for this one. Or how
can I write Select case in Excel
Please reply urgentl
Thanks and regard
Waaha
|