Comment

Comment by ninju

That because Excel defaults to treating numeric data as a number and leading zeros are extraneous and it will strip them off before storing the value (and it will right justify the display).

The root issue is that zipcodes though numeric in content (at least in the US) should not be treated as number (data type) but instead as a text (string) value

To tell Excel to treat this numeric data as a string you to either

* Precede the value with a single quote (') - Excel will treat the rest of the data as a string (and won't hide the leading zeros)

* Before entering the value set the format to TEXT which will tell Excel to take the entry verbatim with no inferring what the data represents (i.e. a number or date)

parent ninju 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton