Setting length of all cells in a column

B

b airlie

I have a column in a spreadsheet that holds bank account
numbers. Unfortunately, although a bank account number
has to be 8 characters long (e.g. 00012345), some of the
leading zeros have been dropped, meaning that the cell >
only contains, for example, 12345.

Some fields only have one leading zero, so the field has
been dropped to 7 characters long, whilst some have no
leading zero so are already the required 8 characters
long.

There are 8000 lines on this spreadsheet so changing the
lines manually is not feasible. Any idea how I could
quickly change those fields that are not already 8
characters long? I need the actual contents of the cell to
change (i.e so that I can see the change in the Formula
bar), not just the view of the cell as I will be importing
the cells into a finance system and need all the leading
zeros to come with it. Thanks in advance.
 
A

Andy Brown

I have to admit I got a bit lost in your description. How about replicating
the column with a formula such as

=RIGHT("00000000"&A1,8)

?

Rgds,
Andy
 
B

B Airlie

Andy

apologies for the convoluted description - despite this,
you still came up with the right answer! Thanks!

Bernard
 

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