Typing a simple stock code like 4-12, a football score like 3-1, or an age group such as 10-12 into Microsoft Excel and pressing Enter often flips your entry straight into “12-Apr”, “01-Mar”, or “12-Oct”. Even worse, if you change that cell back to General formatting afterward, Excel converts the accidental date into a strange five-digit number like 45638 instead of bringing your original text back. Fortunately, three quick habits stop Excel misreading hyphenated numbers completely.
Method 1: Type a Leading Apostrophe for One-Off Entries
If you only have a few model numbers, scores, or size brackets to type, one invisible keystroke keeps Excel hands-off immediately.
- Click the cell where you want to type a code or score.
- Type a single straight apostrophe (‘) right at the start—for example, type ’10-12 or ‘3-1.
- Press Enter.
Excel keeps the exact characters 10-12 intact and hides the apostrophe in the sheet view automatically so it never prints or clutters the table.
Method 2: Format the Entire Column as Text Before Typing
When entering a whole list of part numbers, invoice codes, or scores across dozens of rows, pre-formatting the column saves typing apostrophes every time.
- Click the column letter at the top (or drag across the empty cells where you will enter data).
- Go to the Home tab and look inside the Number group (usually showing “General” in a small drop-down box).
- Click that drop-down arrow and scroll all the way down to choose Text.
From that moment forward, anything typed inside those cells—whether 4-12, 1/4, or 007-2—stays exactly as typed without converting to dates.
Method 3: Turn Off Automatic Data Conversion in Newer Microsoft 365 Excel
If you use modern Microsoft 365 Excel on Windows or Mac, Microsoft added dedicated controls so you can stop some automatic numeric conversions right in Options:
- Click File > Options > Data (or Excel > Settings > Edit on Mac where supported).
- Under Automatic Data Conversion, review options such as keeping leading zeros and preserving long digits—while formatting columns as Text remains the reliable fix specifically for short hyphenated pairs like 3-4 or 10-12.
Why Changing a Flipped Date Back to General Shows 45000+
Once Excel turns 10-12 into 12-Oct, formatting the cell as General later cannot guess whether you originally typed “10-12” or “12 October”—it simply reveals Excel’s internal date serial counter. See why that happens and how to recover safely in our guide on why Excel turns dates into 5-digit numbers, and prevent credit cards or account IDs losing accuracy with our guide to stopping Excel changing long 16-digit numbers to zeros.
Format First, Type Fast
Setting ID, size, or score columns to Text before pasting or typing keeps every hyphenated figure accurate without nasty date surprises.