Our Service


In this comprehensive guide, we will explore everything you need to know about the FORMULATEXT function in Excel. The FORMULATEXT function is a useful tool that allows you to display the formula used in a cell as a text string. This can be particularly helpful when you want to understand the calculations behind a specific cell or when you need to document your spreadsheet for future reference or for sharing with colleagues.


The syntax for the FORMULATEXT function is quite simple, consisting of just one argument:


Where ‘reference’ is the cell containing the formula you want to display as text.


Let’s take a look at some examples of how to use the FORMULATEXT function in Excel:

  1. Basic Example: Suppose you have a formula in cell A1 that calculates the sum of cells B1 and C1, like this: =B1+C1. To display this formula as text in cell D1, you would use the following formula: =FORMULATEXT(A1). The result in cell D1 would be the text string “=B1+C1”.
  2. Using FORMULATEXT with Conditional Formatting: You can use FORMULATEXT in combination with conditional formatting to highlight cells containing specific formulas. For example, you could apply conditional formatting to a range of cells with a custom formula that checks if the FORMULATEXT of each cell contains a specific function, such as VLOOKUP or SUMIF.
  3. Documenting a Spreadsheet: If you have a complex spreadsheet with numerous formulas, you can use FORMULATEXT to create a separate sheet that displays all the formulas used in your workbook. This can be helpful for understanding the calculations behind your data and for sharing your spreadsheet with others who may need to review or modify it.


Here are some tips and tricks to help you get the most out of the FORMULATEXT function:

  1. Keep in mind that FORMULATEXT only works with cells that contain formulas. If you reference a cell that contains a value or text, the function will return an error.
  2. If you want to display the formula used in the same cell as the formula itself, you can use the following trick: enter your formula in the cell, then press F2 to edit the cell, and add the FORMULATEXT function before your formula, like this: =FORMULATEXT(CELL(“filename”,A1))&” “&A1. This will display the formula and its result in the same cell.
  3. When using FORMULATEXT to document your spreadsheet, consider adding comments to your formulas to provide additional context and explanation. You can do this by using the N function, like this: =B1+C1+N(“This formula calculates the sum of B1 and C1”). The N function will not affect the result of your formula, but the comment will be included when you use FORMULATEXT to display the formula as text.

Common Mistakes When Using FORMULATEXT

Here are some common mistakes to avoid when using the FORMULATEXT function:

  1. Using FORMULATEXT with a cell that does not contain a formula will result in a #N/A error. Make sure you only use FORMULATEXT with cells that contain formulas.
  2. Remember that FORMULATEXT returns the formula as a text string, not as an actual formula. If you want to use the result of a formula in another calculation, you should reference the cell containing the formula directly, not the cell containing the FORMULATEXT function.

Why Isn’t My FORMULATEXT Working?

If you’re having trouble with the FORMULATEXT function, consider the following possible issues:

  1. Make sure you’re using the correct syntax for the function, including the equal sign (=) at the beginning and the cell reference as the argument.
  2. Check that the cell you’re referencing with FORMULATEXT actually contains a formula. If the cell contains a value or text, the function will return a #N/A error.
  3. If you’re using FORMULATEXT in combination with other functions or formulas, make sure you’re using the correct syntax and order of operations for all the functions involved.

FORMULATEXT: Related Formulae

Here are some related formulae that you might find useful when working with the FORMULATEXT function:

  1. CELL: The CELL function can provide information about a cell’s formatting, location, or contents. For example, you can use CELL(“filename”,A1) to return the full file path and sheet name of the cell A1.
  2. N: The N function can be used to add comments to your formulas, as mentioned earlier in the Tips & Tricks section. It can also convert text representations of numbers into actual numbers.
  3. FORMULA: In Google Sheets, the FORMULA function serves a similar purpose to Excel’s FORMULATEXT function, allowing you to display the formula used in a cell as a text string.
  4. ISFORMULA: The ISFORMULA function can be used to check if a cell contains a formula. It returns TRUE if the cell contains a formula and FALSE if it does not.
  5. LEN: The LEN function can be used to find the length of a text string, including the text strings returned by the FORMULATEXT function. This can be helpful if you want to analyze or manipulate the formulas in your spreadsheet.

In conclusion, the FORMULATEXT function is a powerful tool for displaying, documenting, and analyzing the formulas used in your Excel spreadsheets. By understanding its syntax, examples, tips, and related functions, you can make the most of this versatile function and enhance your Excel skills.


Did you find this article useful?

Share it with your friends or colleagues

About Aepoch Advisors

We are a boutique accounting and consulting firm servicing international businesses operating in China. We offers book keeping and business advisory service. We also help our clients select and implement SAAS business applications
Cloud technology significantly reduces cost foreign companies traditionally spent on tax compliance and ERP systems. Our cloud professionals can help with streamlining your management and controling structure, as well as advising you on how to reduce risks and maximize profits with software purposely built for Chinese business. Contact us today to learn more about our services.