To paste an Excel formula as text, the fastest method is to add a single apostrophe (') before the equals sign (=) or change the cell format to "Text" before typing. This prevents Excel from calculating the formula and instead displays the literal string of characters, which is essential for creating documentation, tutorials, or templates where the logic must be visible to the user.
What You'll Need
- A computer with Microsoft Excel installed (Windows or macOS).
- An existing workbook containing the formulas you wish to convert to text.
Step-by-Step
Depending on whether you are converting a single cell or a large range of data, choose one of the following methods. Note that menu labels may differ slightly based on your version of Excel or region.
Method 1: The Apostrophe Shortcut (Best for Single Cells)
- Select the cell containing the formula you want to show as text.
- Click into the Formula Bar at the top of the screen or press F2 to enter edit mode.
- Place your cursor at the very beginning of the formula, immediately before the equals sign (=).
- Type a single quotation mark/apostrophe (').
- Press Enter.
Method 2: Formatting Cells as Text (Best for New Entries)
- Select the cell or range of cells where you intend to paste or write formulas as text.
- Go to the Home tab on the ribbon.
- In the Number group, click the dropdown menu (which usually says "General").
- Scroll down and select Text.
- Paste your formula or type it in. Excel will now treat everything entered into those cells as literal text.
Method 3: Using the FORMULATEXT Function (Best for Side-by-Side Display)
- Identify the cell containing the active formula (e.g., cell A1).
- Click into an empty adjacent cell (e.g., cell B1).
- Type
=FORMULATEXT(A1)and press Enter. - Excel will display the formula from cell A1 as a text string in cell B1 while keeping the original calculation active in A1.
Method 4: Global Toggle (Best for Auditing the Entire Sheet)
- Navigate to the Formulas tab on the ribbon.
- In the Formula Auditing group, click the Show Formulas button.
- Alternatively, use the keyboard shortcut Ctrl + ` (the grave accent key, usually located above the Tab key).
- Excel will expand all columns and display every formula in the sheet as text. Press the button or shortcut again to return to the results view.
Common Mistakes
- Applying "Text" Format After Typing: If you change a cell to "Text" format after the formula has already been entered, the formula will not automatically change to text. You must double-click the cell and press Enter to "refresh" the formatting.
- Forgetting the Equals Sign: When using the apostrophe method, ensure the equals sign remains. The apostrophe tells Excel to ignore the equals sign, but the equals sign is still needed if you ever intend to convert the text back into a working formula.
- Over-reliance on Show Formulas: Using the "Show Formulas" toggle changes the view for the entire sheet. If you only need one specific formula to be visible for a presentation, use the apostrophe or FORMULATEXT method instead.
Tips
- Quick Conversion: If you have a long list of formulas and want to convert them all to text permanently, you can use a text editor. Copy the cells, paste them into Notepad (Windows) or TextEdit (Mac), add the apostrophe to the start of the lines using a find-and-replace tool, and paste them back into Excel.
- Visual Cues: When using the apostrophe method, the apostrophe itself is invisible in the cell view; it only appears in the Formula Bar.
- Documentation: Use the FORMULATEXT function when creating "How-to" guides within a spreadsheet, as it allows the user to see the result and the logic simultaneously.
Troubleshooting
If the formula is still calculating and not appearing as text, try these steps in order:
- Refresh the Cell: Double-click the cell to enter edit mode and press Enter. This forces Excel to re-evaluate the cell format.
- Check for Hidden Characters: Ensure there are no spaces before the apostrophe. The apostrophe must be the very first character in the cell.
- Verify Format: Check the Home > Number dropdown again to ensure "Text" is selected. If "General" is selected, Excel will attempt to calculate any string starting with an equals sign.
- Restart the Application: In rare cases of display glitches, saving your work and restarting Excel can resolve formatting lag.
Frequently Asked Questions
Will adding an apostrophe break my formula?
It does not "break" the logic, but it disables it. The formula will no longer calculate a result; it becomes a static string of text. To make it work again, simply delete the apostrophe and press Enter.
Can I convert text formulas back into active formulas in bulk?
Yes. You can use the Find and Replace tool (Ctrl + H). Find the apostrophe (though this can be tricky as it's a prefix) or, more effectively, use a formula to strip the prefix and then use "Paste Values" and a refresh to reactivate them.
Does the FORMULATEXT function work in older versions of Excel?
The FORMULATEXT function was introduced in Excel 2013. If you are using a version older than that, you will need to use the apostrophe method or the "Show Formulas" toggle.
Why does my formula show as text even though I didn't want it to?
This usually happens because the cell was formatted as "Text" before the formula was typed. Change the cell format back to "General," double-click the cell, and press Enter to trigger the calculation.
Is there a way to paste formulas as text from another workbook?
Yes. Format the destination cells as "Text" before pasting. If you paste into "General" cells, Excel will attempt to link the formulas to the original workbook, often resulting in #REF! errors.