Formatting Issues

How to Preserve Number Formatting with LET Function in Excel

Steven ParkerSteven Parker Nov 11, 2026 869 views

Question details

The user wants to keep custom number formatting and specific units when extracting and returning data using the LET function.

How to Preserve Custom Number Formatting When Using the LET Function
Product
Excel
Device & OS
not provided
Scenario
Filtering and combining data with a LET formula where the source data has custom number formats applied.
Observed behavior
The formula returns the correct numeric values but drops the custom formatting and visual units attached to the source cells.
Before you start

Determine whether you need the final output to be a workable number for future calculations or if a text-based display with units is sufficient for your needs.

Solution 1Recommended

Use the TEXT Function within the LET Formula

Convert the numeric output to formatted text directly inside the formula to append units and preserve the appearance.

Because formulas in spreadsheet applications return the underlying raw value rather than the visual formatting of the source cell, you must explicitly instruct the formula on how to format the output. The TEXT function is perfect for this.

1
Identify the value reference

Locate the calculation or value reference in your LET formula that needs to be formatted.

2
Wrap the value with the TEXT function

Modify the formula to wrap your value with the TEXT function using your desired format code. For example: =TEXT(value, "#0.00").

3
Append custom units

Add any required text or units using the ampersand (&) operator. The final syntax will look like: =TEXT(A1, "#0.00") & " in".

Use the TEXT Function within the LET Formula
Text vs. Numeric Values: Using the TEXT function converts the result into a text string. You will not be able to use this cell directly for further mathematical calculations without extracting the number first.
Advanced Formula Formatting in WPS Office

Easily Manage Complex Formulas and Formatting with WPS Spreadsheet

WPS Spreadsheet offers full support for advanced functions like LET and TEXT, allowing you to manipulate data and format numbers flawlessly. It is highly compatible with Microsoft Excel formulas, ensuring a seamless experience when working with complex datasets.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your data.
  2. 2. Enter the formula: Type your LET formula in the desired cell, integrating the TEXT function if you need a text-based output.
  3. 3. Format destination cells: If you kept the output numeric, select the cells and press Ctrl+1 to easily apply custom formatting rules.
Fully supports advanced Excel functions including LET, FILTER, and TEXT.100% compatible with Microsoft Excel formats (.xlsx, .xls).Intuitive Format Cells dialog for building custom number and unit displays.Free and lightweight alternative for powerful data analysis without sluggish performance.
microsoft office alternative - wps office

Frequently Asked Questions

Why do formulas remove my source cell formatting?

Formulas are designed to extract and process the underlying raw data from a cell, not the visual formatting applied to it. To display the same format in the result, you must either format the destination cell or explicitly use functions like TEXT.

Can I sum the results if I use the TEXT function?

No, the TEXT function converts the number into a text string. Aggregate functions like SUM will ignore text strings. To sum the results, keep the formula output numeric and use the "Format Cells" dialog to add custom visual units instead.

What does the #0.00 format code mean?

It is a custom number format code used to dictate how a number appears. The '#' displays significant digits, the '0' ensures a digit is always displayed (even if it's zero), and '.00' forces the number to show exactly two decimal places.