Link to home
Start Free TrialLog in
Avatar of Petersburg1
Petersburg1Flag for Russian Federation

asked on

IF conditions related to font and color

Dear Experts,
I know about the powerful function of conditional formatting. However, I would like if there is a way to implement certain conditions also into a formula.
E.g. IF in field A2 is stated the word "goal" have the entire line in bold or in bold and red font?
thank you
Nils
Avatar of SiddharthRout
SiddharthRout
Flag of India image

Hope this helps

Sub Sample()
    If Range("A2").Font.ColorIndex = 3 And Range("A2").Font.Bold = True Then
        Debug.Print "Font is bold and in Red Color"
    End If
End Sub

Open in new window


Sid
# Select range you want to format
# Choose Format|Conditional Formatting
# From the first dropdown, choose cell value Is
# from the second drop down select equal to
# in the next column write goal
# click on fromat button.
# select the formating you want to apply
Sorry. Please ignore my post. I misunderstood.

Sid
Avatar of Rory Archibald
If you mean you want to use a formula in a cell instead of conditional formatting, then no, that is not possible.
ASKER CERTIFIED SOLUTION
Avatar of Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial