LearnExcel.io
Menu

How to Stop Excel from Changing Numbers

Written by ··Updated June 14, 2026
How to Stop Excel from Changing Numbers

To stop Excel from changing your numbers, format the target cells as Text before you type (Home → Number dropdown → Text), or start the entry with a single apostrophe (') so Excel treats it as literal text. These two fixes cover almost every case—numbers turning into dates, long numbers collapsing into scientific notation, and leading zeros disappearing.

The reason this happens is that Excel’s “General” cell format guesses what your input means. It sees 5-12 and decides it’s May 12th. It sees 00123 and decides the leading zeros are meaningless. It sees a 16-digit account number and rounds it. Below you’ll find the right fix for each situation, on both Windows and Mac, plus how to fix data that’s already been mangled.

Why Excel Changes Your Numbers

Every cell starts with the General number format. General isn’t passive—it actively interprets what you type and reformats it. Knowing which trigger you’ve hit tells you which fix to use.

What you typeWhat Excel showsWhy
5-12 or 5/1212-MayLooks like a date
00123123Leading zeros are “insignificant” in a number
12345678901234561.23457E+15More than 15 significant digits → scientific notation
3/44-Mar or 0.75Read as a date, or converted to a fraction
1.501.5Trailing zero dropped
(123)-123Parentheses read as a negative number

Once you can name the trigger, the fix is almost always one of three things: format as Text, lead with an apostrophe, or set a specific number format.

Fix 1: Format Cells as Text (Best for Bulk Entry)

Formatting as Text tells Excel to store exactly what you type—no interpretation. This is the cleanest fix when you’re about to enter many values (part numbers, ZIP codes, SKUs, IDs).

Important: Apply the Text format before you type. If you format cells as Text after the data is already in there, the underlying value has usually already been converted, and reformatting won’t bring back what was lost.

Windows and Mac steps

  1. Select the cells, column, or range you want to protect.
  2. On the Home tab, click the Number Format dropdown (it shows “General”).
  3. Choose Text.
  4. Type your data. A small green triangle may appear in the corner of each cell—that’s Excel telling you the number is stored as text, which is exactly what you want here.

You can also press Ctrl + 1 (Windows) or ⌘ + 1 (Mac) to open the full Format Cells dialog, choose the Number tab, and select Text. For a deeper walkthrough of every option in that dialog, see our guide to formatting cells in Excel and changing a cell’s data type.

Fix 2: Start with an Apostrophe (Fastest for One Cell)

For a single value, just type a straight apostrophe before it:

'00123
'5-12
'1234567890123456

Excel displays 00123, 5-12, and the full number, and the apostrophe itself stays hidden. It’s only stored as a flag that says “treat this as text.” This is the quickest one-off fix and it’s especially handy for the occasional leading-zero or date-looking value in an otherwise numeric column. See adding an apostrophe in Excel for variations, and removing apostrophes when you later need to convert those entries back to real numbers.

Fix 3: Use a Custom Number Format (Keep Numbers AS Numbers)

The apostrophe and Text tricks turn your entries into text, which is fine for IDs but bad if you still need to do math. When you need the value to stay a real number and display a certain way, use a custom format instead.

  1. Select your cells and press Ctrl + 1 (⌘ + 1 on Mac).
  2. On the Number tab, choose Custom.
  3. In the Type box, enter a format code:
    • 00000 → forces a 5-digit ZIP code, padding with leading zeros (so 1234 shows as 01234).
    • 0.00 → always shows two decimals, including trailing zeros.
    • 0 → whole numbers, no rounding display issues.
  4. Click OK.

This keeps the value numeric so SUM, AVERAGE, and other formulas still work. Our keep leading zeros in Excel guide covers the 00000 approach in detail, and adding a leading zero shows formula-based alternatives.

Stop Numbers Turning into Dates

This is the single most-searched version of the problem—you type 3-5 and get 5-Mar. Use any of these:

  • Format the column as Text before entering (Fix 1). Best for a whole column of range values like 3-5, 7-9.
  • Lead with an apostrophe: '3-5 (Fix 2). Best for one-offs.
  • Add a space first is not reliable—Excel still often converts it. Use Text or the apostrophe instead.

If your data is genuinely numeric but Excel insists on dates, the underlying issue is the General format making a guess. Our dedicated guides go deeper: stop Excel making dates, stop Excel changing numbers to dates, and why Excel keeps changing numbers to dates.

Stop Scientific Notation (Long Numbers Like 1.23E+15)

Excel can only hold 15 significant digits of precision in a number. Anything longer—credit card numbers, 16-digit IDs, long barcodes—gets displayed in scientific notation and the extra digits are rounded to zero internally. There is no number format that fixes this, because the data is genuinely lost once stored as a number.

The only reliable fix for 16+ digit values is to store them as text (Fix 1 or Fix 2) before entry. For numbers under 15 digits that merely display as scientific notation, widening the column or applying a 0 number format is enough. Full details: remove scientific notation in Excel and get rid of scientific notation.

The CSV Trap: Fixing Numbers on Import

A very common version of this problem isn’t typing at all—it’s opening a .csv file. Double-clicking a CSV lets Excel apply General formatting to every column, instantly stripping leading zeros and converting date-looking values. To stop that, don’t double-click the file. Import it instead.

  1. Open a blank workbook.
  2. Go to Data → Get Data → From Text/CSV (Windows) or Data → From Text (Mac).
  3. Select your file. In the preview window, click the header of any problem column.
  4. Set its Data Type to Text before loading.
  5. Click Load.

This is the correct way to bring in account numbers and ZIP codes without corruption. See opening a CSV file in Excel, converting a text file to Excel, and converting Excel to CSV for the round-trip details.

Turn Off AutoCorrect (For Text, Not Numbers)

AutoCorrect handles text substitutions—it won’t stop date or scientific-notation conversion (those are number-format behaviors, not AutoCorrect). But if Excel is “fixing” things like capitalization or replacing characters as you type, turn it off here:

  • Windows: File → Options → Proofing → AutoCorrect Options.
  • Mac: Excel menu → Preferences → AutoCorrect.

Uncheck the rules that are interfering, then click OK. For genuine number-changing problems, rely on Fixes 1–3 above rather than AutoCorrect.

Fixing Data That’s Already Been Changed

If Excel already mangled your data, the bad news is that converted leading zeros and rounded 16-digit numbers are usually gone—the original characters were never stored. Re-import from the source file using the CSV method above to recover them cleanly.

For data that’s recoverable (like dates you want back as the original text), select the range and use Text to Columns: Data → Text to Columns → Delimited → Next → Next → Column data format: Text → Finish. This re-parses each cell and lets you force the Text type. Related cleanup guides: convert text to date, convert an 8-digit number to a date, and stop Excel rounding.

Quick Reference: Which Fix Do I Use?

Your problemFastest fix
One cell turning into a dateType ' before it
A whole column of IDs / ZIPsFormat as Text first
Need to keep doing math on itCustom format (00000, 0.00)
16+ digit number → scientificStore as Text before entry
Numbers break when opening a CSVImport via Data → From Text/CSV
Capitalization / character swapsTurn off AutoCorrect

Frequently Asked Questions

How do I stop Excel from changing numbers?

Format the cells as Text before you type (Home → Number dropdown → Text), or begin each entry with a single apostrophe ('). Both tell Excel to store your input literally instead of interpreting it. Apply the Text format before entering data—reformatting afterward usually won’t restore values Excel already converted.

Why does Excel keep changing my numbers to dates?

Because the cell uses the General format, which reads inputs like 5-12 or 3/4 as dates. Format the column as Text first, or type an apostrophe before the value ('5-12). See our full guide on stopping Excel from changing numbers to dates.

How do I prevent autoformat / autoformatting in Excel?

There’s no single “autoformat off” switch—the behavior comes from the General number format guessing your intent. Override it by explicitly setting the cells to Text or to a Custom number format (Ctrl + 1 / ⌘ + 1 → Number tab). For text-only substitutions, also turn off AutoCorrect under File → Options → Proofing (Windows) or Excel → Preferences (Mac).

How do I stop Excel from removing leading zeros?

Either format the cells as Text before typing, or apply a Custom format like 00000 that pads the value to a fixed width while keeping it numeric. The custom-format route is best when you still need to calculate with the numbers—details in keep leading zeros in Excel.

How do I stop long numbers turning into scientific notation (1.23E+15)?

Store numbers with 16 or more digits as Text, because Excel only keeps 15 significant digits as a true number and rounds the rest. Format the column as Text or lead with an apostrophe before entry. See remove scientific notation in Excel.

Can I still use formulas if my cells are formatted as text?

Yes, but text-formatted numbers won’t add up in SUM the way real numbers do. Convert them back with Text to Columns or VALUE(), or keep the values numeric from the start using a Custom number format instead of Text. See changing a cell’s data type for the cleanest conversion path.

Related guides

How To

Why Is Excel Changing My Numbers?

In this blog post, we’ll discuss why Excel may be changing your numbers and what steps you can take to prevent or fix it. Learn about common issues and solutions in Excel calculations.

May 20, 2023

View all How To guides →