To stop Excel for Microsoft 365 on Windows from changing date-like text, select the destination cells, choose Home > Number Format > Text, and only then type or paste the values. For a one-off entry, start the value with an apostrophe, as in '3/4. If your Excel build offers automatic date conversion controls, you can also turn off conversion of continuous letters and numbers to dates in File > Options > Data.
Why Excel turns text into dates
Excel tries to recognize what you enter and assign it a useful data type. A value such as 3/4 can look like a date, so Excel may interpret it as March 4 or 3 April, depending on your regional date settings. Inputs such as 1-2, 03/04, or a month and year can also be interpreted as dates. The exact patterns Excel recognizes can vary with your locale and version.
This behavior can be helpful when you really are entering dates: Excel can sort them chronologically, use them in date calculations, and display them in different date formats. It is a problem when the characters are identifiers or labels rather than dates. Examples include part codes, fractions written as text, product names, or entries such as SEP1 that resemble a month abbreviation followed by a number.
A key distinction is that cell formatting and cell contents are not the same thing. Once Excel has interpreted an entry as a date, it stores a date value (represented internally as a serial number) and displays it according to a date format. Applying the Text number format afterward changes how Excel treats future input; it does not automatically turn an already-converted date back into the original characters.
Choose the right fix before entering data
For a column or range that should always contain literal text, set its format before entering anything. Select the cells or entire column, then use Home > Number Format > Text. In a new worksheet, you can select the column by clicking its letter at the top. This is usually the clearest method for lists of codes, account references, or values with leading zeros.
For a single value, type an apostrophe before the characters. For example, entering '3/4 tells Excel to keep the entry as text; the apostrophe is a typing instruction and normally does not appear as part of the displayed cell value. The cell may show a small green indicator, depending on your error-checking settings, because Excel notices that the text resembles a number or date.
- Use Text formatting for a whole column or a batch of upcoming entries.
- Use an apostrophe for an isolated value or a quick manual correction.
- Use an import workflow for a CSV or other external file with many fields that need controlled types.
On Windows, Ctrl+1 opens the Format Cells dialog, where you can select Text on the Number tab. On Mac, Command+1 opens Format Cells. The ribbon route is also available in Excel for Microsoft 365 on Windows and Mac, although the exact layout can differ slightly by platform.
Turn off automatic date conversion when available
Some Microsoft 365 versions include controls for automatic conversion of text to dates. On Windows, open File > Options > Data and look for the Automatic Data Conversion section. If the option to convert continuous letters and numbers to a date is selected, clear it to prevent that particular conversion when entering, pasting, or loading text. You may also see other controls for conversions such as removing leading zeros or changing long numbers; those settings address different problems.
The controls are not present in every Excel release or update channel, so do not assume that a missing checkbox means your workbook is broken. Update availability and wording can change. If you do not see the date option, use Text formatting, an apostrophe, or import settings instead. These methods are also useful when you need a workbook to behave predictably on another person’s computer, where their Excel settings may differ.
Changing an automatic conversion preference does not repair values Excel already changed. It affects future conversions covered by that preference. For important workbooks, test the setting on a few sample entries and check the resulting cell values before relying on it for a large paste or import.
Keep dates and codes straight in an existing sheet
If Excel has already converted a value, first consider whether you can undo the action. If the conversion happened in the most recent entry or paste, press Ctrl+Z on Windows (Command+Z on Mac). Undo is the most reliable way to restore the prior state, provided no later changes need to be preserved.
If undo is no longer practical, inspect the cell and the source data. A date-formatted cell may contain a real date value even if it displays something like Mar-04. Changing its number format to Text will not recover the exact original spelling, punctuation, or intent. The displayed date may be based on an interpretation that cannot be inferred with certainty from the stored value alone.
For a large range of values that are still intact as text but need explicit type handling, you can use Excel’s import or conversion tools carefully. Do not run a conversion operation on the only copy of valuable data without checking its effect. If the original text has been lost through conversion, the safest recovery source is usually the original file, an earlier workbook version, or a trusted data source.
Import CSV files without unwanted date changes
Opening a CSV by double-clicking it can let Excel interpret fields automatically. If a column contains date-like codes, import the file through Data > From Text/CSV instead. In the import experience, review the preview and available data-type detection choices. In builds that offer it, choosing Do not detect data types avoids automatic type inference; alternatively, use the transformation interface to set the affected column’s type to Text before loading.
Import options vary by Excel build and by the file source. If the preview does not expose a no-detection choice, open the data in the Power Query editor when available, select the relevant column, and set its data type to Text before loading it to the worksheet. Check several rows after loading, including entries near the bottom of the file: a preview is not proof that every value was imported as intended.
A CSV file itself stores text fields, not Excel cell formats. When Excel opens or imports it, Excel decides how to interpret those characters. That is why the same CSV can appear differently in different spreadsheet programs or under different regional settings. If a colleague sends the file, ask whether the values are intended as real dates or identifiers; visual appearance alone may not tell you.
Leading zeros, long numbers, and similar cases
Date conversion is one example of a broader issue: Excel may interpret text-like entries as numbers or other types. A code such as 00127 can lose its leading zeros if Excel treats it as a number. Long digit strings may also be altered because Excel’s numeric precision is limited; identifiers such as tracking numbers should generally be stored as text, not as numeric quantities.
Preformatting a column as Text helps preserve these values as entered. It is especially important for postal codes, product IDs, phone numbers, and account references, where arithmetic is not the purpose. If a value is genuinely numeric and you need to calculate with it, store it as a number and use a suitable number format for display. Choose based on what the value means, not just how it looks.
There is a difference between displaying leading zeros and storing them. A custom number format can show zeros in front of a numeric value, but the underlying value remains a number. That is useful for presentation when calculations matter; it is not equivalent to preserving a text identifier exactly as supplied.
Common mistakes and how to avoid them
- Formatting cells as Text after typing: this does not reverse an earlier conversion. Set the format first, then re-enter or re-import the values.
- Assuming a visible date is still text: select the cell and inspect the formula bar and number format. A date-looking display may be a stored date value.
- Relying on one computer’s regional settings: ambiguous entries such as
3/4can mean different dates in different locales. Use an unambiguous format in source data or import the field as text when it is not a date. - Using text formatting for data that must be calculated: text dates do not behave like real dates in date arithmetic. Keep genuine dates as dates and identifiers as text.
- Assuming the apostrophe is part of the data: it is generally an entry prefix, not a character that will display in the cell. Check the formula bar or export a sample if exact output matters.
Frequently Asked Questions
How do I stop Excel changing 1-2 into a date?
Select the destination cells and set Home > Number Format > Text before entering the value. For one cell, type an apostrophe first, as in '1-2. If the entry has already changed and you can undo it, use Ctrl+Z on Windows or Command+Z on Mac.
How do I change an Excel date back to text?
If the conversion just happened, undo it. Otherwise, changing the cell format alone will not restore the exact original text. You can create a text representation of the stored date, but that produces a chosen format, not necessarily the original characters or intended meaning. Recovering the original may require the source data.
Does putting an apostrophe before a value change what is displayed?
Usually, Excel hides the leading apostrophe and displays the following characters as text. It can be a quick way to enter one date-like code without changing a whole column’s format.
Why does the same value become a different date on another computer?
Regional settings affect how Excel reads ambiguous date patterns. For example, month/day and day/month conventions can interpret the same digits differently. Importing the field as Text, or supplying an unambiguous date format when it is truly a date, reduces that risk.
Can I stop Excel changing dates in a CSV?
Import the file using Data > From Text/CSV rather than relying on automatic opening. Review the data-type detection options and set date-like code columns to Text before loading. Confirm the result in the worksheet because CSV files do not preserve Excel cell formatting.
Related
- Project Timeline Excel Template: Simple Planning Guide
- Sorting by Dates in Excel: A Clear Step-by-Step Guide
- Snowflake CSV vs CSV for Excel: Which Should You Choose?
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel: Calculate Percentage Difference Between NumbersIf A2 contains the first number and B2 the second, calculate the percentage difference with =ABS(A2-B2)/AVERAGE(ABS(A2),ABS(B2)), then format…
- Microsoft Excel Solver: How It Works and When to Use ItMicrosoft Excel Solver is an optimization add-in that finds values for selected cells to maximize or minimize a…
- Excel Solver: Where to Find It and How It Works in 365Yes—Excel includes Solver as an add-in, but it may not be enabled yet. In desktop Excel for Microsoft…
- How to Import an Excel Document Into Microsoft WordTo put Excel data in Word, copy the cells you want in Excel and paste them into Word…
- How to Alphabetize in Google SheetsTo alphabetize in Google Sheets, select the data you want to organize, then choose Data > Sort range…
- Expense Tracker and Budget Spreadsheet: Setup GuideAn expense tracker and budget spreadsheet is a workbook for recording income and spending, setting category limits, and…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.