Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 542
Default keeping leading 0's when formatting cells

I am currently writting a small macro but ran across some trouble when
seperating a numbers in a cell that have leading zero's. Below is an example
of one of the cells that I have.

00000001 00005212 00012312

I have tried converting the column to a "text" format but cannot keep the
leading zero's there when I do a text to column, making a new column when
there is a space. I know if I put a " ' " it will keep the leading zero's
but how can I apply that to all the data in that column. or is there some
better way to keep the leading zero's in the cells once they are seperated
into 3 different columns.

Thanks for the help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default keeping leading 0's when formatting cells

Format the columns as 00000000

--
__________________________________
HTH

Bob

"James" wrote in message
...
I am currently writting a small macro but ran across some trouble when
seperating a numbers in a cell that have leading zero's. Below is an
example
of one of the cells that I have.

00000001 00005212 00012312

I have tried converting the column to a "text" format but cannot keep the
leading zero's there when I do a text to column, making a new column when
there is a space. I know if I put a " ' " it will keep the leading zero's
but how can I apply that to all the data in that column. or is there some
better way to keep the leading zero's in the cells once they are seperated
into 3 different columns.

Thanks for the help.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default keeping leading 0's when formatting cells

When running though the Text to columns wizard, in step 3 designate each column
as Data TypeText


Gord Dibben MS Excel MVP

On Fri, 27 Jun 2008 14:00:01 -0700, James
wrote:

I am currently writting a small macro but ran across some trouble when
seperating a numbers in a cell that have leading zero's. Below is an example
of one of the cells that I have.

00000001 00005212 00012312

I have tried converting the column to a "text" format but cannot keep the
leading zero's there when I do a text to column, making a new column when
there is a space. I know if I put a " ' " it will keep the leading zero's
but how can I apply that to all the data in that column. or is there some
better way to keep the leading zero's in the cells once they are seperated
into 3 different columns.

Thanks for the help.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 542
Default keeping leading 0's when formatting cells

I always rush on the text to column items I have never seen step 3. That is
exactly what I need. Thanks.

"Gord Dibben" wrote:

When running though the Text to columns wizard, in step 3 designate each column
as Data TypeText


Gord Dibben MS Excel MVP

On Fri, 27 Jun 2008 14:00:01 -0700, James
wrote:

I am currently writting a small macro but ran across some trouble when
seperating a numbers in a cell that have leading zero's. Below is an example
of one of the cells that I have.

00000001 00005212 00012312

I have tried converting the column to a "text" format but cannot keep the
leading zero's there when I do a text to column, making a new column when
there is a space. I know if I put a " ' " it will keep the leading zero's
but how can I apply that to all the data in that column. or is there some
better way to keep the leading zero's in the cells once they are seperated
into 3 different columns.

Thanks for the help.



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
How to copy a number into a text cell, keeping leading zeros? Basher Bates Charts and Charting in Excel 2 February 23rd 08 03:26 PM
Keeping leading zeros in imported data (one digit month as 05) exito816 Excel Discussion (Misc queries) 2 September 28th 07 10:35 PM
Keeping leading 0's CLR Excel Discussion (Misc queries) 3 March 3rd 06 10:45 PM
Combining Cells BUT Keeping source formatting FROSTY Excel Worksheet Functions 1 August 9th 05 12:57 AM
numbers and text in Excel to read as text keeping the leading zer. Ralph Excel Discussion (Misc queries) 2 December 10th 04 07:05 PM


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