Solved

IF conditions related to font and color

Posted on 2011-03-14
5
257 Views
Last Modified: 2012-05-11
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
0
Comment
Question by:Petersburg1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35126614
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
0
 
LVL 5

Expert Comment

by:mayankagarwal
ID: 35126615
# 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
0
 
LVL 30

Expert Comment

by:SiddharthRout
ID: 35126618
Sorry. Please ignore my post. I misunderstood.

Sid
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 35126665
If you mean you want to use a formula in a cell instead of conditional formatting, then no, that is not possible.
0
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 250 total points
ID: 35126719
Hello,

maybe you could post a sample file and explain in context. The way I read your question is that you would like a row to be in bold red font if the text in column A of the cell contains the word "goal".

If so, you can select all rows, then create a conditional formatting rule with a formula like

=FIND("goal",$A1)

(Mind the $ sign!!) and select a format. See attached.

cheers, teylyn
Book8.xlsx
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question