ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I bold entire row with an asterisk in the text? (https://www.excelbanter.com/excel-programming/409723-how-do-i-bold-entire-row-asterisk-text.html)

timwell

How do I bold entire row with an asterisk in the text?
 
Hi,
I have a spreadsheet with 16 columns. Column C has text in each
cell. In some of the cells in column C there is an (asterisk) * with
the text. For example CARS *. I would like in each instance of the
asterisk in column C to bold that entire row. Then move on to the
next row until there are no more asterisks. I will not have more
than 500 rows. Thanks for any help with this. TimW

Rick Rothstein \(MVP - VB\)[_1778_]

How do I bold entire row with an asterisk in the text?
 
Give this macro a try...

Sub MakeRowBold()
Dim C As Range
Dim LastRow As Long
With Worksheets("Sheet1")
LastRow = .Cells(.Rows.Count, "C").Row
For Each C In Range("C1:C" & LastRow)
If InStr(C.Value, "*") Then
C.EntireRow.Font.Bold = True
End If
Next
End With
End Sub

Change the worksheet name in the With statement to the name of your actual
sheet.

Rick



"timwell" wrote in message
...
Hi,
I have a spreadsheet with 16 columns. Column C has text in each
cell. In some of the cells in column C there is an (asterisk) * with
the text. For example CARS *. I would like in each instance of the
asterisk in column C to bold that entire row. Then move on to the
next row until there are no more asterisks. I will not have more
than 500 rows. Thanks for any help with this. TimW



James Snell

How do I bold entire row with an asterisk in the text?
 
Hi Tim,

It sounds like you're looking for a conditional format based on a formula.
To implement it...

Select cell A1
Click Format Conditional Formatting
Set the options for the condition to:-
Formula Is
=IF(FIND("*",$C1)0,TRUE,FALSE)
Set a format then OK out of the dialogues
Select the format painter from the toolbar then click in the box above the
number 1 row label.

The whole sheet is now set to apply that format if a * appears in column C
of the row.


Hope that helps.

~ James

"timwell" wrote:

Hi,
I have a spreadsheet with 16 columns. Column C has text in each
cell. In some of the cells in column C there is an (asterisk) * with
the text. For example CARS *. I would like in each instance of the
asterisk in column C to bold that entire row. Then move on to the
next row until there are no more asterisks. I will not have more
than 500 rows. Thanks for any help with this. TimW


Rick Rothstein \(MVP - VB\)[_1780_]

How do I bold entire row with an asterisk in the text?
 
Show a programmer (me) what looks like a programming question in a
programming newsgroup and he (me) will come up with a programming solution
every time.<g

Of course, your Conditional Formatting suggestion is far superior to what I
posted... 'timwell' take note.

Rick


"James Snell" wrote in message
...
Hi Tim,

It sounds like you're looking for a conditional format based on a formula.
To implement it...

Select cell A1
Click Format Conditional Formatting
Set the options for the condition to:-
Formula Is
=IF(FIND("*",$C1)0,TRUE,FALSE)
Set a format then OK out of the dialogues
Select the format painter from the toolbar then click in the box above the
number 1 row label.

The whole sheet is now set to apply that format if a * appears in column C
of the row.


Hope that helps.

~ James

"timwell" wrote:

Hi,
I have a spreadsheet with 16 columns. Column C has text in each
cell. In some of the cells in column C there is an (asterisk) * with
the text. For example CARS *. I would like in each instance of the
asterisk in column C to bold that entire row. Then move on to the
next row until there are no more asterisks. I will not have more
than 500 rows. Thanks for any help with this. TimW



timwell

How do I bold entire row with an asterisk in the text?
 
On Apr 21, 3:06*pm, "Rick Rothstein \(MVP - VB\)"
wrote:
Show a programmer (me) what looks like a programming question in a
programming newsgroup and he (me) will come up with a programming solution
every time.<g

Of course, your Conditional Formatting suggestion is far superior to what I
posted... 'timwell' take note.

Rick

"James Snell" wrote in message

...



Hi Tim,


It sounds like you're looking for a conditional format based on a formula.
To implement it...


Select cell A1
Click Format Conditional Formatting
Set the options for the condition to:-
*Formula Is
*=IF(FIND("*",$C1)0,TRUE,FALSE)
Set a format then OK out of the dialogues
Select the format painter from the toolbar then click in the box above the
number 1 row label.


The whole sheet is now set to apply that format if a * appears in column C
of the row.


Hope that helps.


~ James


"timwell" wrote:


Hi,
I have a spreadsheet with 16 columns. *Column C has text in each
cell. *In some of the cells in column C there is an (asterisk) * with
the text. *For example CARS *. *I would like in each instance of the
asterisk in column C to bold that entire row. *Then move on to the
next row until there are no more asterisks. * I will not have more
than 500 rows. Thanks for any help with this. TimW- Hide quoted text -


- Show quoted text -


Thanks so much guys. I used the conditional formatting suggested by
James. Rick your comments were very appreciated. I had earlier tried
both methods but couldn't get either to work for me. I do not post
often so I hope I replied correctly. Again thank you! TimW


All times are GMT +1. The time now is 11:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com