How to Preserve Number Formatting with LET Function in Excel
Question details
The user wants to keep custom number formatting and specific units when extracting and returning data 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.
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.
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.
Locate the calculation or value reference in your LET formula that needs to be formatted.
Modify the formula to wrap your value with the TEXT function using your desired format code. For example: =TEXT(value, "#0.00").
Add any required text or units using the ampersand (&) operator. The final syntax will look like: =TEXT(A1, "#0.00") & " in".

Apply Custom Formatting to the Destination Cells
Keep the formula output numeric so it can be used in further calculations, and change how the destination cells display the values.
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. Open your workbook: Launch WPS Spreadsheet and open the file containing your data.
- 2. Enter the formula: Type your LET formula in the desired cell, integrating the TEXT function if you need a text-based output.
- 3. Format destination cells: If you kept the output numeric, select the cells and press Ctrl+1 to easily apply custom formatting rules.

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.




