Auto insert values?

R

Rick

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

Dave Peterson

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.
 
R

Rick

Dave,

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

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top