View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JVANWORTH JVANWORTH is offline
external usenet poster
 
Posts: 50
Default Functions Expert€¦..four (4) different colors if a specific con

Mike H,

I'm sure this works, but my ability is limited in where to put. How do I
insert this into the work sheet. I need direction in order to execute.

"Mike H" wrote:

try this:-

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1")) _
Is Nothing Then Exit Sub
Select Case Target.Value
Case "A" To "E"
icolor = 3
Case "F" To "J"
icolor = 41
Case "K" To "O"
icolor = 4
Case "P" To "T"
icolor = 6
Case Else
End Select
Target.Interior.ColorIndex = icolor
End Sub


"JVANWORTH" wrote:

I need a cell to change into four (4) different colors if a specific
condition is met. For example if A1 matches a text value €śA thru E€ť I need
€śred€ť, if its a €śF thru J€ť then €śblue€ť, €śK thru O€ť then €śgreen€ť, €śP thru T€ť
then yellow.

Im struggling with the set up of this requirement.