Solved

IF conditions related to font and color

Posted on 2011-03-14
5
254 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
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:
teylyn 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

705 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now