Solved

IF conditions related to font and color

Posted on 2011-03-14
5
255 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:
Ingeborg Hawighorst 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

914 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

17 Experts available now in Live!

Get 1:1 Help Now