[Last Call] Learn how to a build a cloud-first strategyRegister Now


Bold entire row if any cell in column S contains the word New

Posted on 2014-08-13
Medium Priority
Last Modified: 2014-08-13
Could an expert provide me with the VBA code that will Bold entire row if any cell in column S contains the word New

Thanks in advance
Question by:Jagwarman
  • 2
LVL 11

Expert Comment

by:John Easton
ID: 40257740
Do you need VBA code or just conditional formatting?

Conditional formatting is simpler to implement.  Just enter the following as a formula for the entire block of data you want it to apply to:

Open in new window

Then set whatever formatting you want to apply.
LVL 54

Accepted Solution

Rgonzo1971 earned 2000 total points
ID: 40257742


Sub macro()

For Each c In Range(Range("S1"), Range("S" & Cells.Rows.Count).End(xlUp))
    If c = "New" Then
        c.EntireRow.Font.Bold = True
    End If
End Sub


Author Comment

ID: 40257746
JEaston I thought of that but the word 'New' is removed later in the Macro and this makes the cells go back to regular Font. As thia is a small part of a much larger Macro I prefer to have VBA code. But thanks anyway.

Author Comment

ID: 40257748
Thanks Rgonzo exactly what I need.

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This article describes a serious pitfall that can happen when deleting shapes using VBA.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

831 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