Excel changes formulas to text when the cell uses Text format. In that case, the formula no longer calculates and the cell shows the text of the formula instead of a result. Fix the format, then re-enter the formula with F2 and Enter. This guide shows how to check common causes after paste or conversion and repair the formula so it calculates again.

What the symptom means in Excel

What the symptom means in Excel
An Excel worksheet graphic compares AVERAGE and AVERAGEA formulas

When Excel treats a formula as text, the cell shows the formula itself instead of a result. Changes in referenced cells may not update that cell, because the entry is acting as text rather than a formula.

The fastest first check is simple: click the cell and look in the formula bar. If the entry appears as text, re-entering the cell is often enough to restore the formula.

What the formula bar can tell you

The formula bar gives a direct view of what Excel stored in the cell. If the cell should contain a formula but is showing text, that usually points to a formatting issue or a change made during paste or import.

Say your cell displays =SUM(A1:A10) instead of a number, and editing A1 does nothing. That points to text storage, not a bad SUM formula.

📊 Excel has been developed since 1985. Source: Microsoft Excel.

Why does Excel keep changing my formula to text?

Excel most often does this after a paste or import, especially when the destination cell is already formatted as Text. Less commonly, a macro changes the format, notably an event macro. The same issue can happen when data is copied and pasted from another source or imported into a worksheet.

Copy and paste from web pages or other applications is a common trigger because the source may preserve plain text instead of a formula object. Excel might also change the cell format to Text when you import data.

Likely causes, ranked from most to less common

  • Pasted formula from another app or web page: Excel receives plain text, not a live formula.
  • Imported CSV or external data: the incoming value is stored as text.
  • Cell preformatted as Text: Excel keeps the entry as text even if it starts with =.
  • Macro changed the cell format: an event macro or similar automation may have set the cell to Text.

Microsoft has described the same pattern for text conversion when data is imported or copy-pasted, and it also notes that macros can change cell format to Text.

Diagnostic table: symptom, cause, and fastest fix

Symptom Likely cause Fastest fix
Formula appears in the cell and does not calculate The entry is stored as text Change the cell format to General, then press F2 and Enter to re-enter it as a formula
Imported values look like formulas but never calculate CSV, web, or external import brought the formula in as text Re-enter one affected cell with F2 and Enter after checking the format
New formulas paste in as text Destination cells are formatted as Text Change the format to General, then paste or re-enter the formula
Formulas start behaving like text after automation runs A macro changed the cell format Start Excel in safe mode and open the file without the macro running

How do I stop Excel from turning formulas into text?

How do I stop Excel from turning formulas into text?
A person types on a laptop displaying a spreadsheet

Format the target cells before you paste or type formulas. If the cells already exist, change them to General first, then enter the formula again. That keeps Excel from preserving text behavior in the destination range.

A common first-time mistake is pasting formulas into a column that has been preformatted as Text in a template. Suppose a roughly 200-row invoice sheet has column D set to Text. Every pasted formula will look fine at first, then sit there as text until you reset the format.

  1. Select the destination cells.
  2. Go to Home > Number and choose General.
  3. Paste or type the formula again.
  4. If the cell still shows text, press F2, then Enter to force Excel to re-parse it as a formula.

How do you remove a leading apostrophe from a formula in Excel?

A leading apostrophe is Excel’s text marker. If it appears before a formula, the cell stops calculating until you remove it and re-enter the entry. The apostrophe may show in the formula bar even when it is hard to spot in the grid.

  1. Select the affected cell.
  2. Press F2 to edit the cell.
  3. Delete the apostrophe at the start, if present.
  4. Press Enter to confirm. If it is an array-entered formula, use Ctrl+Shift+Enter instead.

If many cells were pasted with apostrophes, clear the format first, then re-enter a sample cell before copying the corrected formula down the range.

How do you convert imported text back into a formula?

For imported data, the built-in fix is to correct the cell format and then re-enter the formula. If the data came in as text after import, changing the format and re-entering one cell can restore calculation for that cell and any copied formulas.

  1. Select the range that contains the text formulas.
  2. Change the number format to General.
  3. Select one affected cell and press F2, then Enter.
  4. If needed, copy the corrected formula to the rest of the range.

This workflow is useful when the import kept text formatting. It is also a better first move than guessing at formulas or trying random arithmetic fixes on the data.

Can importing CSV files make Excel formulas become text?

Can importing CSV files make Excel formulas become text?
A CSV file icon points toward the Excel logo on a blue background

Yes. CSV and other external imports can bring formula-like entries into Excel as plain text, especially when the source system exported them as strings instead of formulas. The result is that the cell shows the formula text and does not recalculate.

Before opening CSV data, check the target column format. Excel works on Windows, macOS, Android, iOS, and iPadOS, but the import path and file handling are still important across those platforms. (microsoft.com)

Use this quick import check before opening CSV or web data

  1. Open the file into a blank sheet, not over existing formatted cells.
  2. Check whether the destination column is set to General, not Text.
  3. After the import, inspect a sample cell in the formula bar.
  4. If the text values need conversion, change the format to General and re-enter a sample formula cell.

How do I fix formulas that paste as text?

For pasted formulas, the fastest fix is to clear the Text format in the destination cells and then re-enter the formula. If Excel already stored the entry as text, pasting again into the same Text-formatted range will repeat the problem.

  1. Select the pasted range.
  2. Change the number format to General from Home > Number.
  3. Click one broken cell and press F2, then Enter.
  4. Fill the corrected formula through the rest of the range.

Use paste methods that preserve formulas, not plain text. If you are moving cells between workbooks, check the destination format first.

Still not working?

If the cell-level fixes do not help, the issue may be workbook-wide rather than text conversion. Start Excel in safe mode, be sure that macro security is disabled, and open the file in safe Excel. Then change a referenced input cell and see whether the formula updates.

  1. Start Excel in safe mode by holding Ctrl while clicking the Excel icon.
  2. Keep holding Ctrl until you are prompted to continue in safe mode.
  3. Open the file in safe Excel.
  4. If a macro may be changing the format, safe mode helps prevent it from running.
  5. If the problem continues in safe mode, upload an example Excel file to a file-sharing website and share a public or view-only link.

For template authors, the best prevention is simple: format cells before pasting formulas, and check import settings before opening CSV or web data.

Frequently asked questions

Why does Excel keep changing my formula to text?

Most often, the target cell is formatted as Text before the formula is entered or pasted. Copy-and-paste, import, or a macro can also trigger it. Change the format to General, then press F2 and Enter to make Excel parse the entry as a formula again.

How do I stop Excel from turning formulas into text?

Format the destination cells as General before you paste or type the formula. If the formula already landed as text, edit one cell with F2 and press Enter. That forces Excel to store the entry as a working formula instead of a text string.

Why is my formula showing in the cell instead of the result?

That usually means the cell stores the formula as text, so Excel is not calculating it. Check the formula bar and re-enter the formula after changing the cell format to General.

How do I remove an apostrophe from a formula in Excel?

Select the cell, press F2, delete the apostrophe at the start, and press Enter. If the formula is array-entered, use Ctrl+Shift+Enter instead.

Can importing CSV files make Excel formulas become text?

Yes. CSV and other imports can bring formula-like entries in as text, especially when the source system exports strings rather than formulas. After import, change the range to General, then re-enter a sample formula cell so Excel recalculates the data.

What is the quickest fix for formulas that paste as text?

Change the destination cells from Text to General, then press F2 and Enter on one broken cell. If several cells were pasted, correct the first one and fill the rest from that cell. This is faster than trying to paste again into the same Text-formatted range.