?
Solved

IF conditions related to font and color

Posted on 2011-03-14
5
Medium Priority
?
259 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 1000 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

762 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