Hi All,

I'm designing a holiday chart in work, and am using conditional formatting to colour cells.

The problem is I have more than 3 conditions. Consequently I need to use a macro.

I have the following code, but have a couple of questions.


Private Sub Worksheet_Change(ByVal Target As Range)

Dim icolor As Integer



    If Not Intersect(Target, Range("G8:GE30", "G35:GH57")) Is Nothing Then
    

        Select Case Target

            Case 0 To 1

                icolor = 6

            
            Case Else

                'Whatever

        End Select

        

        Target.Interior.ColorIndex = icolor

    End If



End Sub
My range select isn't working as I'd like? I need to select 2 individual ranges at the same time?

G8:GE30 and G35:GH57 but based on what is entered above excel seems to be selecting G8:GH57? Can anyone tell me how to fix this?

Also

Can anyone advise how to include a second condition e.g. if the letter L is inserted in a cell, i'd like to shade it grey?

I'd appreciate any help!
Many thanks,
John