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

x
?
Solved

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

Posted on 2014-08-13
4
Medium Priority
?
4,213 Views
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
0
Comment
Question by:Jagwarman
  • 2
4 Comments
 
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:
=IF($S1="new",TRUE,FALSE)

Open in new window


Then set whatever formatting you want to apply.
0
 
LVL 54

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 40257742
Hi,

As VBA

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
Next
End Sub

Regards
0
 

Author Comment

by:Jagwarman
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.
0
 

Author Comment

by:Jagwarman
ID: 40257748
Thanks Rgonzo exactly what I need.
0

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