Drilon Berisha
asked on
Excel Conditions
I need help here with condition on excel
If Cell A2 is the same color as B2 then apply something else on C2..
If Cell A2 is the same color as B2 then apply something else on C2..
Is the plan to implement this via a conditional formatting formula?
ASKER
Yes
I couldn't get the conditional formatting to set the color.
the formula '=A2.interior.color = 255' is accepted but does nothing
macro codewise it is:
If Range("A2").Interior.Color = 255 Then Range("C2").Interior.Color = 150
apparently you cannot get the format directly and should use code. I do it on the sheet selection change event e.g.
Private Sub Worksheet_SelectionChange( ByVal Target As Range)
If Range("A2").Interior.Color = 255 Then Range("C2").Interior.Color = 150
the formula '=A2.interior.color = 255' is accepted but does nothing
macro codewise it is:
If Range("A2").Interior.Color
apparently you cannot get the format directly and should use code. I do it on the sheet selection change event e.g.
Private Sub Worksheet_SelectionChange(
If Range("A2").Interior.Color
Unfortunately, the Color and ColorIndex properties of a Range don't return the color of a cell that is displayed if Conditional formatting is applied to the cell. Nor does it allow you to determine whether a conditional format is currently in effect for a cell.
See this article by Chip Pearson for workarounds.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I've requested that this question be deleted for the following reason:
Not enough information to confirm an answer.
Not enough information to confirm an answer.
ASKER
This Worked Perfect
Thanks.
Thanks.