tags:

views:

146

answers:

2

Hello

I know there are other similar threads on SO, but they suggest formating the cells to text and/or prefixing the cells with a '.

I've done them both, and it works fine in Excel 2007, but when I open the exact same Excel template in Excel 2003 and paste the same source, it removes the leading zeros. Are there any other possibilities? Could one make a macro something?

EDIT: I found a solution for a different problem that solves this as well. Similar problem. Record a macro that uses 'Paste Special' as text, and override ctrl-v on that spreadsheet.

A: 

If you use a leading ' then it should work.

Alex Andronov
A: 

Just select cells with data, right click, choose format, select custom and type the same number of zeros that You want to display (it is better explained here).

zeroDivisible
It might be good enough in this case, but sometimes it's not sufficient. If you've a field representing an ID like 0012345, Excel might display 0012345 but the underlying data is still 12345 - which is wrong, and you may fail lookups/processing as a result. It's better to load the data correctly than try to fix it afterwards.
Joel Goodwin