PC Review


Reply
Thread Tools Rate Thread

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

 
 
timwell
Guest
Posts: n/a
 
      21st Apr 2008
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
 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      21st Apr 2008
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" <(E-Mail Removed)> wrote in message
news:dc597185-69ba-4e3e-acf9-(E-Mail Removed)...
> 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


 
Reply With Quote
 
James Snell
Guest
Posts: n/a
 
      21st Apr 2008
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
>

 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      21st Apr 2008
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" <(E-Mail Removed)> wrote in message
news:E5189E8F-EB27-4300-B213-(E-Mail Removed)...
> 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
>>


 
Reply With Quote
 
timwell
Guest
Posts: n/a
 
      22nd Apr 2008
On Apr 21, 3:06*pm, "Rick Rothstein \(MVP - VB\)"
<rick.newsNO.S...@NO.SPAMverizon.net> 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" <JamesSn...@discussions.microsoft.com> wrote in message
>
> news:E5189E8F-EB27-4300-B213-(E-Mail Removed)...
>
>
>
> > 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 columnC
> > 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TOC heading 1 text bold, dot leaders and page number NOT bold Donna Microsoft Word Document Management 4 21st Nov 2008 03:39 PM
When I want to bold one word it does the entire doc why?? =?Utf-8?B?ZG1vcnJpcw==?= Microsoft Word Document Management 3 29th Dec 2005 08:46 PM
Why when I bold some text does Word 2003 bold all text? Fix? =?Utf-8?B?TWV0cmljbWFu?= Microsoft Word Document Management 1 3rd Jun 2005 04:23 PM
How to use Bold and non bold text in a single textbox in office 20 =?Utf-8?B?SGFyb29u?= Microsoft Access VBA Modules 3 28th Jan 2005 03:39 PM
How to use Bold and non bold text in a single textbox in office 20 =?Utf-8?B?Sm9l?= Microsoft Access Reports 1 28th Jan 2005 03:26 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:11 AM.