Home |
Search |
Today's Posts |
|
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional formatting a full row triggered by a single cell reference... | Excel Worksheet Functions | |||
cell color index comparison | New Users to Excel | |||
up to 7 functions? | Excel Worksheet Functions | |||
Formatting dates in the future | Excel Worksheet Functions | |||
Cell Formatting | Excel Discussion (Misc queries) |