Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How tp display fractions / custom number | Excel Worksheet Functions | |||
how do I add phone number format as a permanent custom format? | Excel Discussion (Misc queries) | |||
Format a cell with a custom number format | Excel Worksheet Functions | |||
Custom Number Display | Excel Worksheet Functions | |||
Why does Custom Format not control Cell Display? | Excel Discussion (Misc queries) |