Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
myrddinbach
 
Posts: n/a
Default Specialized Cell Formatting

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?

  #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?



  #3   Report Post  
Sloth
 
Posts: n/a
Default Specialized Cell Formatting

Use a custom format of

######\.##\.######\.#

or

000000\.00\.000000\.0

The second one keeps leading zeros

Example:
000456789012345
456.78.901234.5
or
000456.78.901234.5

"myrddinbach" wrote:

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?


  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default Specialized Cell Formatting

One way:

Format/Cells/Number/Custom 000000\.00\.000000\.0


In article . com,
"myrddinbach" wrote:

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?

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
Conditional formatting a full row triggered by a single cell reference... neilcarden Excel Worksheet Functions 1 August 17th 05 02:59 PM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
up to 7 functions? ALex Excel Worksheet Functions 10 April 12th 05 06:42 PM
Formatting dates in the future Compass Rose Excel Worksheet Functions 3 January 17th 05 10:39 PM
Cell Formatting jmaulsby Excel Discussion (Misc queries) 1 December 9th 04 03:25 PM


All times are GMT +1. The time now is 11:47 PM.

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

About Us

"It's about Microsoft Excel"