Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove asterisk from column with text only Anna Excel Discussion (Misc queries) 4 September 25th 09 04:57 PM
Bold text in MsgBox Francis Hookham Excel Programming 2 April 8th 08 09:16 AM
Find "X", bold entire row [email protected] Excel Programming 1 October 11th 07 04:42 AM
Join bold and non-bold text in one cell bkincaid Excel Discussion (Misc queries) 3 March 21st 06 12:58 AM
Inputbox - display text as asterisk Tim Childs Excel Programming 5 December 12th 03 10:53 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"