Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default Underline and Bold 4th numeral

Hello from Steved

all cells in column C

3547

How does one underline and bold the 4th numeral in this case 7 please.

Thankyou.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Underline and Bold 4th numeral

Steve,

If you can live with the cells formatted as strings:

Sub Macro1()
Dim myS As String
Dim myC As Range

For Each myC In Intersect(ActiveSheet.UsedRange, Range("C:C"))
myS = myC.Value
myC.NumberFormat = "@"
myC.Value = myS
With myC.Characters(Start:=4, Length:=1).Font
.FontStyle = "Bold"
.Underline = xlUnderlineStyleSingle
End With
Next myC
End Sub

Otherwise, the formatting won't take.

HTH,
Bernie
MS Excel MVP



"Steved" wrote in message
...
Hello from Steved

all cells in column C

3547

How does one underline and bold the 4th numeral in this case 7 please.

Thankyou.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Underline and Bold 4th numeral

Hello Steved

Assuming you always want the 4th numeral bolded and underlined try
this:

Sub Test()
Application.ScreenUpdating = False
Columns("C").Select
For Each cell In Selection

With cell.Characters(Start:=4, Length:=1).Font
.FontStyle = "Bold"
.Underline = xlUnderlineStyleSingle
End With
Next
Application.ScreenUpdating = True
End Sub

Regards,
Per

On 13 Nov., 02:50, Steved wrote:
Hello from Steved

all cells in column C

3547

How does one underline and bold the 4th numeral in this case 7 please.

Thankyou.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default Underline and Bold 4th numeral

Thankyou.

"Per Jessen" wrote:

Hello Steved

Assuming you always want the 4th numeral bolded and underlined try
this:

Sub Test()
Application.ScreenUpdating = False
Columns("C").Select
For Each cell In Selection

With cell.Characters(Start:=4, Length:=1).Font
.FontStyle = "Bold"
.Underline = xlUnderlineStyleSingle
End With
Next
Application.ScreenUpdating = True
End Sub

Regards,
Per

On 13 Nov., 02:50, Steved wrote:
Hello from Steved

all cells in column C

3547

How does one underline and bold the 4th numeral in this case 7 please.

Thankyou.



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
Cannot bold, italicize or underline text - Excel hangs BlueTele Setting up and Configuration of Excel 3 June 19th 08 10:43 AM
In Excel 2003, I cannot display the toolbar with BOLD,UNDERLINE EJ Setting up and Configuration of Excel 2 March 15th 06 04:24 PM
formatting (underline/bold/strikethrough) in comment boxes adam l via OfficeKB.com Excel Discussion (Misc queries) 3 November 8th 05 05:55 PM
bold italics or underline Dorothy Excel Discussion (Misc queries) 5 February 16th 05 03:15 PM
Changing font size, bold and underline ChuckM[_2_] Excel Programming 1 December 17th 03 02:12 PM


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

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

About Us

"It's about Microsoft Excel"