In this guide
Appearance
Appearance
By Scot, 10+ years in IT support and helpdesk ·How these guides are checked
Select the cells before you type, press Ctrl + 1, choose Text on the Number tab, and click OK. For a single value, type an apostrophe first: '1-2.
Checked against Microsoft 365 Roadmap, Office release notes - Current Channel and between 5 Aug 2026 and 12 Sep 2026. Nothing published in that period has been linked to this guide.
Excel reads anything that resembles a date as a date, so 1-2 becomes 2-Jan and the leading zero vanishes from 02134. This article shows you how to stop the conversion before you type, how to rescue a column that has already been converted, and how to import CSV files without Excel rewriting them on the way in.
1-2 and the cell shows 2-Jan.03-05 display as 3-May or 5-Mar, depending on your region settings.02134 becomes 2134, and 007 becomes 7.1.23457E+15, and the final digits turn into zeros.1/2 show as 2-Jan.46024.In this guide
This is the fix that works every time, and the order is the whole point: format first, type second.
1-2 stays 1-2, and 02134 keeps its leading zero.Verification: Click one of the cells you filled. The value sits against the left edge of the cell instead of the right — that is Excel showing you it is holding text, not a number.
Note: Excel for the web has no Format Cells dialog. Open the Home tab, click the number format dropdown in the Number group — it reads General — and choose Text at the bottom of the list.
Note: Text-formatted cells do not calculate.
=SUM()across a Text column returns0. Use Text for codes, IDs, ZIP codes and part numbers — anything you will never do arithmetic on.
Use this when a single cell needs to behave and you do not want to change the format of a whole column.
'1-2.1-2. The apostrophe is a formatting instruction, not part of the value, and it never prints.'1-2 with the apostrophe; the sheet shows 1-2 without it.Tip: A small green triangle appears in the top-left corner of the cell, and clicking the warning icon beside it shows Number Stored as Text. That is expected here. Choose Ignore Error from that menu to clear the triangle.
This is the part that catches people out, and knowing it saves you twenty minutes of trying formats that cannot work.
2-Jan-2026 is held as 46024, and the date you see on screen is a display format sitting on top of that number.1-2, the characters you typed are discarded. Excel keeps 46024 and nothing else.46024. There is no copy of 1-2 left in the file to restore.Note: Press Ctrl + Z immediately and the conversion is undone along with the entry, leaving an empty cell you can format as Text before retyping. Undo only helps in the seconds after the entry — once you save and close the workbook, it is gone.
Pick the method that matches the size of the damage.
For a short column, retype it. Format the cells as Text using Step 1, then enter the values again from your original source.
For a long column of date-like codes, rebuild the text from the serial number. This works when every value followed the same pattern.
1-2, use:=TEXT(A2,"m-d")For lost leading zeros, the underlying number is intact, so a custom format restores them on screen.
00000 — one zero for each digit the value needs.2134 now displays as 02134.Note: A custom format changes the display only. The cell still holds the number
2134, so exporting to CSV writes2134again. To make the zeros part of the value, build a helper column with=TEXT(A2,"00000")and paste the result back as values.
Tip: If the converted column now shows a row of hashes instead of dates, the column is too narrow rather than broken — see How to Fix "######" Errors in Excel Cells.
If the data came from a CSV or a system export, do not repair it in the sheet. Clear the sheet and re-import with Step 6, which sets the column types before any value is converted.
Excel for Microsoft 365 on Windows added a group of switches that cover several of these conversions. They apply to Excel on this computer, in every workbook you open.
02134 whole.1E5 as text.SEP2024 as text.Note: These switches do not cover the
1-2to2-Jancase. A dash or slash between two numbers is read as a date in every version of Excel, with no setting to turn it off. Steps 1 and 2 are the fix for that one.
Note: No Automatic Data Conversion heading on the Data page means your Excel predates version 2309. Check File > Account > About Excel for your version number. The Text format and apostrophe methods work in every release.
Double-clicking a CSV gives Excel no chance to ask you anything — it converts as it opens. Import the file instead.
03-05 and 02134 exactly as the file holds them.To keep some columns as numbers and others as text:
Tip: The import is saved with the workbook. When the source file changes, click any cell in the imported table and choose Data > Refresh All. Your column types are reapplied on every refresh, so the file cannot break itself again.
Note: CSV files bring their own set of problems beyond date conversion — stripped leading zeros, long numbers truncated to scientific notation, and accented characters arriving as
é. For the full import routine including encoding and delimiter settings, see How to Open a CSV File in Excel Without Breaking It.
WARNING
Formatting a cell as Text after Excel has converted your entry does not recover it — the characters you typed are already discarded and the cell holds a date serial number. Format first, then type. If a column has already been converted and you have no copy of the source data, Step 4 rebuilds what it can, but re-importing from the original file is the reliable route.
| Symptom / Error | Potential Cause | Solution |
|---|---|---|
Typing 1-2 gives 2-Jan | Dash between numbers read as a date | Format the cells as Text before typing (Step 1), or type '1-2 (Step 2). |
Cell shows a five-digit number such as 46024 | Format changed to Text after conversion | The value is a date serial number. Rebuild it with the TEXT formula in Step 4, or retype the column. |
| Leading zeros dropped from ZIP codes | Excel strips zeros from numbers | Clear the leading-zeros switch (Step 5), or apply the custom 00000 format (Step 4). |
| Long account numbers end in zeros | Excel keeps 15 digits of precision | Format the column as Text before pasting (Step 1) and clear the truncation switch (Step 5). |
| The same CSV breaks every time you open it | Double-clicking converts on open | Import with Data > From Text/CSV and set Do not detect data types (Step 6), or follow How to Open a CSV File in Excel Without Breaking It. |
=SUM() over the column returns 0 | Text-formatted cells do not calculate | Expected. Keep Text for codes only. To convert genuine numbers back, see How to Fix Numbers Stored as Text in Excel. |
IT Tip Tuesday
Get a short, actionable IT tip in your inbox every week.
Nothing loads from beehiiv until you click. Once it does, the form sets beehiiv's own cookies and loads beehiiv's own analytics.