LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 519
Default Include "00"

Hello from Steved

The below works fine on 4 digits ie"2542" but will delete the first 2 digits
if they are "00" so please how can I instruct using the below macro to allow
"0042" because at the moment it will delet the "00" and leave "42" yes I need
it to be please "0042"

I Thankyou.

Sub Underline4thDigit()
Dim RR As Range
Dim R As Range
Dim WS As Worksheet
Set WS = ActiveSheet
With WS
Set RR = Application.Intersect(.UsedRange, _
.Range(.Cells(5, "D"), .Cells(.Rows.Count, "D")))
End With

For Each R In RR.Cells
With R.Characters(Start:=4, Length:=1).Font
.FontStyle = "Bold"
.Color = -16776961
.Underline = xlUnderlineStyleSingle
End With
Next R
End Sub

 
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
need formula? to include blank cells in "running balance" teprps - ko Excel Discussion (Misc queries) 5 October 17th 08 02:44 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Pivot Table "Include hidden items in totals" LizO Excel Discussion (Misc queries) 0 March 14th 06 07:37 PM
MSNStockQuote AddIn for Excel should include a "YIELD" option. John Smith Excel Discussion (Misc queries) 0 November 15th 05 04:45 AM
Automatically include contents of a cell in "Save As..." filename. Bryan Linton Excel Programming 1 September 1st 04 12:14 PM


All times are GMT +1. The time now is 01:53 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"