Discussion Locked

Excel - Adding a Zero before a number in

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I created a spreadsheet using Excel 97 and I need to add a zero in front of every number in a column. This spreadsheet hass 4k+ records. This column will be used to sort and import/export data and must have a "0" added to each cell. Can it be done?

6 replies

by don christner

If you make the column a text column you can have leading zeroes. I would add a column next to the column that you have and define the second column as text, that way you preserve the data that you already have.

Don

by don christner

I should point out that you would then use CONCATENATE() in your new column to join 0 and the text from your column into the new column. You would then copy the formula down the cell so that you do not add it manually to all 4000 cells.

Don

by Member 35711908

Rather than manually add the zero to all 4000+ rows, try the following workaround:

Insert two or three blank columns just before the column in question. Save the file as a CSV, comma separated value, file. Open this file in Word or a text editor, and you will find that just before the data in question you will have multiple commas (one for each blank row inserted above, +1) with no data between them. You can then use Word's Find and Replace to replace ,,,, with ,,,,0 for example. Save this file again as a .CSV and reopen it in Excel, making sure to mark the specific column you're working on as a text column, as noted in answer 1. After you've got it open in Excel again, you can delete the blank columns, leaving your original spreadsheet, plus the zeros.

This discussion is closed to new replies.