logo
search
Function Problems

How to Evaluate Text Expressions in Excel Formulas

Maira MehtabMaira Mehtab Sep 27, 2026 869 views

Question details

The user wants to calculate the mathematical result of a text string containing numbers and operators (e.g., '1/3*1/5+7/10') within a spreadsheet.

Product
Excel
Device & OS
not provided
Scenario
Converting a string of text that represents a mathematical equation into an actual numeric result for data analysis or reporting.
Observed behavior
Excel does not calculate equations formatted as text directly within standard cells without utilizing legacy macro functions or VBA.
Before you start

Ensure your text strings contain valid mathematical operators (+, -, *, /) and numeric values. Note that the legacy EVALUATE function relies on Excel 4.0 Macros, meaning your workbook will ultimately need to be saved as a Macro-Enabled Workbook (.xlsm).

Solution 1Recommended

Evaluate Text Expressions Using Name Manager

Use Excel's Name Manager to define a custom named formula that leverages the legacy EVALUATE function to parse and calculate text equations.

The EVALUATE function is an old Excel 4.0 Macro function. It cannot be typed directly into a cell like standard functions (e.g., SUM or AVERAGE). Instead, it must be routed through the Name Manager to function correctly on your worksheet.

1
Select the Target Cell

Click on the cell where you want the calculated result of your text expression to appear.

2
Open the Name Manager

Navigate to the 'Formulas' tab on the Excel ribbon, then click 'Name Manager'. In the dialog box that appears, click the 'New' button.

3
Define the Custom Name

In the 'Name' field, type a recognizable name without spaces, such as 'CalculateText'.

4
Enter the EVALUATE Formula

In the 'Refers to' field at the bottom, type the formula =EVALUATE(B2), replacing 'B2' with the relative cell reference that contains your text expression. Click 'OK' and close the Name Manager.

5
Apply the Named Formula

Go back to your selected target cell, type =CalculateText, and press Enter. The cell will now display the calculated mathematical result of the text string.

Web Compatibility: The EVALUATE function is not supported in Excel for the Web because it relies on legacy desktop macro capabilities.
Efficient Spreadsheet Management

Evaluate Formulas Easily with WPS Spreadsheet

WPS Office provides powerful spreadsheet capabilities, fully supporting complex formula evaluations, Name Manager configurations, and VBA macros to help you calculate text expressions seamlessly.

  1. 1. Open your Document in WPS Spreadsheet: Launch WPS Office and open your spreadsheet containing the text expressions.
  2. 2. Access the Name Manager: Go to the 'Formulas' tab on the top ribbon and select 'Name Manager'.
  3. 3. Create an EVALUATE Reference: Click 'New', give it a custom name (e.g., CalcString), and type =EVALUATE(A1) in the 'Refers to' box.
  4. 4. Calculate the Result: Type =CalcString in your desired output cell and press Enter to instantly evaluate the text expression.
Fully compatible with Microsoft Excel formulas and functions.Robust Name Manager support for executing legacy macro functions like EVALUATE.Built-in VBA editor for creating custom text-evaluation functions.Free, lightweight, and fast performance for complex data processing.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the EVALUATE function return a #NAME? error in Excel?

This error occurs if you try to type =EVALUATE() directly into a standard cell. EVALUATE is a legacy Excel 4.0 macro function and can only be executed through the Name Manager or by using a VBA script.

Can I use the EVALUATE function in Excel for the Web?

No, the EVALUATE function relies on legacy macros and VBA features, neither of which are supported in Excel for the Web. You must use the desktop version of Excel to evaluate text expressions using this method.

Do I need to save my workbook in a special format after using EVALUATE?

Yes. Because the EVALUATE function utilizes macro features, you must save your file as an Excel Macro-Enabled Workbook (.xlsm). If saved as a standard .xlsx file, the defined names using EVALUATE will be removed upon closing.