View Single Post
  #2   Report Post  
Ian
 
Posts: n/a
Default Specialized Cell Formatting

Sub addpoints()
For r = 1 To 20 ' change row range to suit
d = Cells(r, "A").Value ' change column letter to suit
Cells(r, "A").Value = Left(d, 6) & "." & Mid(d, 7, 2) & "." & Mid(d, 9, 6) &
"." & Right(d, 1) ' change column letter to suit
Next r
End Sub


--
Ian
--
"myrddinbach" wrote in message
ups.com...
I have a column that contains a string of numbers, but I need to have
it formatted in a customized way using a few .'s. And I want to know if
there is any way I can set the formatting for this column so that it
will automatically change all the cells in this column without me
having ot manually do it.

Here's an example of what I need:
In each column a string of numbers like:

123456789012345

The string of numbers need to be formatted like so:

123456.78.901234.5

The column is already filled with numbers in the first example.
Can I somehow automate the formatting of this string of numbers so it
will automatically change them as in the second example?