How to Stop Excel from Converting Numbers like 10-15 into Dates
Question details
The user wants to enter hyphenated numbers or numerical ranges (such as "10 - 15") into an Excel cell without the software automatically converting the input into a date.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Entering ranges, fractions, or part numbers that contain hyphens or slashes into a spreadsheet cell.
- Observed behavior
- Excel automatically interprets the hyphenated number as a date (e.g., Oct-15). Reverting the cell format back to General displays the date's underlying serial number, requiring the user to re-enter the data.
Identify all the cells or columns where you plan to type your hyphenated data, as you will need to apply formatting rules to these specific areas before entering your text.
Format Cells as Text Before Typing
Pre-formatting the cells as Text tells Excel to treat anything you type exactly as a text string, bypassing the automatic date conversion feature.
This method is best when you have an entire column or a large batch of cells where you need to enter ranges, fractions, or hyphenated codes.
Highlight the specific cell, range, or entire column where you will enter your data.
Right-click the selected area and choose "Format Cells" from the context menu, or press Ctrl+1 on your keyboard.
In the Format Cells dialog box, go to the Number tab, select "Text" from the Category list, and click OK.
Type your entry, such as "10 - 15". Excel will now preserve the exact characters you entered without converting them to a date.

Use a Leading Apostrophe
Typing an apostrophe before your entry instantly forces Excel to treat that single cell's contents as text.
Manage Data Formatting Easily with WPS Spreadsheet
WPS Spreadsheet provides precise control over cell formatting, making it simple to prevent automatic date conversions. It is fully compatible with Excel files and features a highly familiar interface.
- 1. Open your file in WPS: Launch WPS Spreadsheet and open your target workbook.
- 2. Select and format: Highlight the cells you need to edit, right-click, and select "Format Cells".
- 3. Apply Text format: Under the Number tab, choose "Text" and click OK.
- 4. Input your data: Type your hyphenated numbers or ranges safely without triggering any automatic date changes.

Frequently Asked Questions
Why does Excel automatically change my numbers to dates?
Excel is programmed with auto-formatting rules designed to save time during data entry. When it detects patterns resembling dates (like numbers separated by hyphens or slashes), it automatically converts them based on your computer's regional date settings.
How do I fix a cell that has already been converted to a serial number?
Once Excel converts your text to a date, changing the format back to "General" or "Text" will only reveal the underlying date serial number (e.g., 44119). To fix this, you must first format the cell as Text, delete the serial number, and re-type your original entry.
Can I turn off automatic date conversion globally in Excel?
In newer versions of Excel, you can disable this by navigating to File > Options > Data, and unchecking the options for automatic data conversion. However, in older versions, you must rely on pre-formatting cells as text or using the apostrophe method.




