Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I write a script to add space between numbers in a column?

I have a file with a column that contains numbers that have six digits. I
need to add a space between the last two digits in this very long column of
numbers. Is there an efficient way of doing this? Example: 120100 needs to
be 1201 00


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default How do I write a script to add space between numbers in a column?

As long as they're really numbers, you could use a custom format:

Select the column:
format|Cells|number tab|Custom category
0000 00

The value that you see in the formula bar will still be the number--only the
display has changed.

wrote:

I have a file with a column that contains numbers that have six digits. I
need to add a space between the last two digits in this very long column of
numbers. Is there an efficient way of doing this? Example: 120100 needs to
be 1201 00


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default How do I write a script to add space between numbers in a column?

The easiest way I know is to enter a formula in the next column to reformat
the data. Assume the data is in cell A1. The formula would look like this.
Copy the formula to all remaining cells in the new out put column

=LEFT(A1,4) & " " & RIGHT(A1,2)



" wrote:

I have a file with a column that contains numbers that have six digits. I
need to add a space between the last two digits in this very long column of
numbers. Is there an efficient way of doing this? Example: 120100 needs to
be 1201 00


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default How do I write a script to add space between numbers in a column?

Format cells/ custom/ 0 00
Or, if you want to use the result somewhere else in that format, =TEXT(A1,"0
00")
--
David Biddulph

"
wrote in message ...
I have a file with a column that contains numbers that have six digits. I
need to add a space between the last two digits in this very long column
of
numbers. Is there an efficient way of doing this? Example: 120100 needs
to
be 1201 00




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I write a script to add space between numbers in a column?

You could custom format to create the look of 1201 00

Custom 0000 00

To change them to text.

=LEFT(A1,4) & " " & RIGHT(A1,2) entered in B1

Double-click to copy down.

When happy, copypaste specialvaluesOKEsc and delete column A


Gord Dibben MS Excel MVP

On Tue, 15 May 2007 07:49:01 -0700,
wrote:

I have a file with a column that contains numbers that have six digits. I
need to add a space between the last two digits in this very long column of
numbers. Is there an efficient way of doing this? Example: 120100 needs to
be 1201 00




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
Sort Column Script Bernie New Users to Excel 3 January 23rd 07 05:52 PM
How do I remove a space from the middle of a line of numbers? Raich Excel Discussion (Misc queries) 2 September 12th 06 07:10 PM
Extra space after imported numbers Duane Excel Discussion (Misc queries) 1 May 26th 05 04:20 PM
Space between decimal numbers Timmy Excel Worksheet Functions 6 May 26th 05 07:42 AM
how write excel formula numbers in column => &=< between 20-40 ron New Users to Excel 4 April 30th 05 02:37 PM


All times are GMT +1. The time now is 02:26 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"