#1   Report Post  
Rick
 
Posts: n/a
Default Auto insert values?

I am importing a .csv file and wish to have cells populate a default length
in width. If the cell doesnt take up the whole width, I would like to have
zeroes (or some other value) inserted at the beginning. Example: the cell
needs to be 8 characters, the number importing is only 4 and I wish to add 4
zeroes in front such as 00001234 automatically. How would I accomplish this?
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Can you just format that column to show the leading 0's?

Select the column
format|Cells|Number tab
custom
00000000

If that's not enough, maybe you can use a helper column to show the leading 0's.

=text(a1,"00000000")
and drag down.

Then copy|paste special|values and delete the original column.

If I wanted this automatic, I'd record a macro when I did it the first time.
Then I could run that macro to open the .csv file and do the manipulation.



Rick wrote:

I am importing a .csv file and wish to have cells populate a default length
in width. If the cell doesnt take up the whole width, I would like to have
zeroes (or some other value) inserted at the beginning. Example: the cell
needs to be 8 characters, the number importing is only 4 and I wish to add 4
zeroes in front such as 00001234 automatically. How would I accomplish this?


--

Dave Peterson
  #3   Report Post  
Rick
 
Posts: n/a
Default

Dave,

You have answered a couple of my requests! Thank you for participating.
Your information is very helpful!

Rick

"Dave Peterson" wrote:

Can you just format that column to show the leading 0's?

Select the column
format|Cells|Number tab
custom
00000000

If that's not enough, maybe you can use a helper column to show the leading 0's.

=text(a1,"00000000")
and drag down.

Then copy|paste special|values and delete the original column.

If I wanted this automatic, I'd record a macro when I did it the first time.
Then I could run that macro to open the .csv file and do the manipulation.



Rick wrote:

I am importing a .csv file and wish to have cells populate a default length
in width. If the cell doesnt take up the whole width, I would like to have
zeroes (or some other value) inserted at the beginning. Example: the cell
needs to be 8 characters, the number importing is only 4 and I wish to add 4
zeroes in front such as 00001234 automatically. How would I accomplish this?


--

Dave Peterson

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
insert picture BillGwyer Excel Discussion (Misc queries) 1 March 4th 05 06:37 PM
how do you prevent data from changing values when sorting linked . Cassie Excel Discussion (Misc queries) 0 March 4th 05 10:45 AM
Second serie doesn't use X-as values JackRnl Charts and Charting in Excel 1 January 20th 05 01:04 AM
Challenging Charting C TO Charts and Charting in Excel 0 January 17th 05 06:57 PM
Auto Insert of Rows Gar3th Excel Worksheet Functions 0 January 6th 05 08:33 PM


All times are GMT +1. The time now is 03:43 AM.

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"