View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default how to do the conditional formatting for this?

From a post of mine earlier today. Change to suit to

select case month(target)

Use a worksheet_event with select case to change your format,something like
this.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
With Target
Select Case Target.Value
Case Is = 76
.Interior.ColorIndex = 3 '(red shade)
Case Is = 52
.Interior.ColorIndex = 4 '(green shade)
Case Is = 26
.Interior.ColorIndex = 46 '(orange shade)
Case Is = 11
.Interior.ColorIndex = 41 '(blue shade)
Case Is = 6
.Interior.ColorIndex = 6 '(yellow shade)
End Select
End With
End If
End Sub

--
Don Guillett
SalesAid Software

"KiriumF1" wrote in message
...
in column B, i have dates in the form 1/1/92 to 31/12/92, how do i write

the
conditional formating, so that i can highlight particular months...for
example, all june will be red, or all December will be red?