Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Keeps Changing the Number I Enter? Fix It

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Excel changes the number you type because it is applying automatic formatting based on what it thinks the entry is: a date, a percentage, a currency value, or a number with leading zeros that it treats as text. To stop it, set the cell format to Text before typing, or prefix the entry with an apostrophe. For long numbers like account or ID numbers, Text format is the reliable fix; for simple cases, the apostrophe is fastest.

What You'll Need

  • Excel for Windows, Mac, or the web (steps are written for the desktop app; the web version has the same core options but menu labels can differ slightly by version and region)
  • The number or text you want to keep exactly as typed

Step-by-Step

  1. Identify the pattern. Note what Excel turns your entry into: a date (e.g., 1-2 becomes 02-Jan), a percentage (10 becomes 10%), a decimal (1.10 becomes 1.1), or a number with zeros removed (00123 becomes 123). This tells you which fix to use.
  2. For a single cell, use the apostrophe method. Type an apostrophe (') before the number, then press Enter. Excel stores the entry as text and hides the apostrophe. This works for IDs, phone numbers, and any value where leading zeros must stay.
  3. For a whole column, format before typing. Select the column or range, right-click, choose Format Cells, go to the Number tab, select Text, and click OK. Then type your numbers. Text format keeps exactly what you type, including leading zeros and long digit strings.
  4. Use the Format Cells dialog for specific number types. If you want numbers to stay numeric but display a fixed number of decimals, select the cells, open Format Cells, choose Number, and set the decimal places. For currency, choose Currency and pick your symbol. For percentages, choose Percentage only if you actually want percent values.
  5. Stop Excel from auto-converting on paste. If the problem happens when pasting, paste as text: copy your data, right-click the destination, and use Paste Special > Text, or paste into Notepad first and then copy into Excel. This strips the formatting that triggers conversion.
  6. Turn off automatic date conversion for typed entries. Excel converts some entries to dates automatically. There is no single global switch for all cases, but formatting the cells as Text before typing prevents it. For CSV imports, use Data > From Text/CSV and set the column type to Text in the import wizard.
  7. Check for a custom format already applied. Select the cell and look at the Number Format box on the Home tab. If it shows something like Date or a custom code, change it to General or Text. A custom format can make a number look changed even when the stored value is correct.
  8. Verify the stored value. Click the cell and look at the formula bar. If the formula bar shows your original entry but the cell displays something else, the issue is formatting, not data loss. If the formula bar shows the converted value, the entry was changed on input and you need the Text format fix.

Common Mistakes

  • Formatting after typing. Changing a cell to Text after Excel has already converted the entry does not restore leading zeros. You must set Text first, then retype or re-paste.
  • Using Text format for numbers you need to calculate. Text values cannot be summed or used in formulas. Use Text only for identifiers, phone numbers, and codes; keep real quantities as numbers with a number format.
  • Confusing display with storage. A cell showing 1.10 may store 1.1. Check the formula bar before assuming data was lost.
  • Pasting from another app without Paste Special. Copying from web pages or other programs often carries hidden formatting that triggers conversion. Use Paste Special > Text or paste via a plain-text editor.
  • Ignoring the green triangle warning. Excel may flag text-formatted numbers with a warning. That is expected; do not click Convert to Number unless you want the conversion.

Tips

  • Set the entire column to Text before entering a list of IDs, ZIP codes, or account numbers.
  • Use an apostrophe for one-off entries; use Format Cells > Text for repeated entry.
  • For CSV files, import with the column type set to Text rather than opening the file directly.
  • If you need both display and calculation, keep the cell numeric and apply a custom number format that shows leading zeros (e.g., 00000) instead of converting to text.
  • Test with a copy of your sheet before reformatting a large range, since changing formats can affect formulas that depend on those cells.

Troubleshooting

  • Numbers still change after setting Text: Confirm the format was applied to the exact cells you are typing in, and that you are not typing into a merged cell with a different format. Reapply Format Cells > Text to the whole range.
  • Leading zeros disappear on paste: Paste Special > Text, or pre-format the destination column as Text before pasting.
  • Dates appear where you typed numbers: Excel interpreted the entry as a date. Format the cells as Text and retype, or enter the value with a leading apostrophe.
  • Large numbers show as scientific notation (e.g., 1.23E+15): This happens with long numeric entries. Format as Text before typing, or use a custom number format with enough digits.
  • Formulas return errors after formatting as Text: Text values cannot be used in arithmetic. Convert back to General or Number for cells used in calculations, and keep identifiers in a separate text-formatted column.

Frequently Asked Questions

Why does Excel change 00123 to 123?

Excel treats the entry as a number and drops leading zeros. Format the cell as Text before typing, or type an apostrophe before the number.

How do I stop Excel from turning numbers into dates?

Set the cells to Text format before entering the data, or prefix the entry with an apostrophe. For imported files, set the column type to Text in the import wizard.

Does the apostrophe method work for formulas?

No. The apostrophe forces text, so the cell cannot be used in calculations. Use it only for identifiers and codes.

Why does the formula bar show a different value than the cell?

The cell has a number format applied that changes the display. The formula bar shows the stored value. Check Format Cells to see the applied format.

Can I keep leading zeros and still do math?

Not in the same cell. Keep a numeric column for calculations and a text-formatted column for display, or use a custom number format that shows leading zeros while storing a number.

Why do pasted numbers change but typed ones do not?

Pasted content can carry formatting or be interpreted differently. Use Paste Special > Text or paste through a plain-text editor first.