S
Sandy
I have a situation where given certain criteria conditional formats are set.
One in particular sets the background colour of cells to Light Yellow
(Interior.ColorIndex = 36). What I would like to do is the following :-
Function YellowBack(MyRange As Range)
Dim MyCell As Range
YellowBack = False
For Each MyCell In MyRange
If MyCell ***(has conditional format with Light Yellow
background)*** Then
YellowBack = True
Exit Function
End If
Next MyCell
End Function
I have tried the "If" line :-
"If MyCell.Interior.ColorIndex = 36 Then"
but the conditionally formatted colour is not being identified - I presume
it is identifying the un- conditionally formatted background colour - if
you see what I mean.
Any help gratefully received.
Sandy
One in particular sets the background colour of cells to Light Yellow
(Interior.ColorIndex = 36). What I would like to do is the following :-
Function YellowBack(MyRange As Range)
Dim MyCell As Range
YellowBack = False
For Each MyCell In MyRange
If MyCell ***(has conditional format with Light Yellow
background)*** Then
YellowBack = True
Exit Function
End If
Next MyCell
End Function
I have tried the "If" line :-
"If MyCell.Interior.ColorIndex = 36 Then"
but the conditionally formatted colour is not being identified - I presume
it is identifying the un- conditionally formatted background colour - if
you see what I mean.
Any help gratefully received.
Sandy