LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Custom number display format

On Thu, 15 May 2008 17:59:30 -0400, "Rick Rothstein \(MVP - VB\)"
wrote:

A minor simplification...

Sub SpecFormat()
Dim c As Range
For Each c In Selection
c.Offset(0, 1).Value = Format(Replace(c.Value, "-", ""), _
"0000-0000-0000-0000000")
Next
End Sub

Rick


Nice. I didn't think to use Format because I was thinking in Excel, where
formats (and the Text worksheet function) applies to numbers, and not strings.
--ron


 
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
How tp display fractions / custom number Diane Excel Worksheet Functions 2 December 22nd 06 09:57 PM
how do I add phone number format as a permanent custom format? frustratedagain Excel Discussion (Misc queries) 3 February 4th 06 03:52 AM
Format a cell with a custom number format Armor Excel Worksheet Functions 4 January 29th 06 11:25 PM
Custom Number Display Lee Harris Excel Worksheet Functions 2 December 6th 05 01:19 AM
Why does Custom Format not control Cell Display? Dennis Excel Discussion (Misc queries) 1 June 11th 05 12:28 AM


All times are GMT +1. The time now is 12:30 PM.

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"