Can Excel Custom Number Formats Perform Arithmetic?
Question details
The user wants to know if Excel custom number formatting can be used to perform arithmetic, specifically to display a single cell value as a calculated range.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Attempting to create a custom number format code that mathematically alters a cell's display, such as taking a value of 5 and displaying it as the range '4-5'.
- Observed behavior
- Custom number formats only modify the visual representation of the existing cell value; they cannot process mathematical operations or calculate dynamic ranges based on the original number.
Keep in mind that when using formulas to output a range with a hyphen (like '4-5'), Excel treats the result as text, meaning you cannot easily use that cell in standard numeric calculations without additional parsing.
Use an Ampersand (&) Formula to Calculate and Display a Range
Since number formatting cannot perform arithmetic, you must use a formula to stitch your mathematical calculations together into a text string representing the range.
This approach uses Excel's concatenation operator (&) to combine the results of two separate calculations alongside a text character (the hyphen) into a single cell.
Click on the empty cell where you want the calculated range to be displayed.
Type the formula combining your math and a hyphen, such as =A3-1&"-"&A3 (assuming your base value is in cell A3).
Press Enter to see the result displayed as a range. If cell A3 contains 5, the formula will display '4-5'.

Extract Numbers from a Text Range for Subsequent Calculations
If you need to perform further calculations referencing a cell that already displays a text range (like '4-5'), use text-parsing functions to extract the numeric value.
Calculate and Format Data Easily with WPS Spreadsheet
WPS Spreadsheet offers robust formula capabilities and high compatibility with Microsoft Excel, allowing you to easily construct complex text strings, parse data, and apply custom number formats for free.
- 1. Open your document: Launch WPS Spreadsheet and open your workbook.
- 2. Input the calculation formula: Select a cell and enter your formula, such as =A1-1 & "-" & A1.
- 3. View the result instantly: Press Enter to instantly display your calculated range as a text string.

Frequently Asked Questions
Can conditional formatting perform arithmetic in Excel?
Conditional formatting can evaluate mathematical calculations to determine if a formatting rule should be applied, but it cannot change the actual cell value or output a newly calculated number.
How do I apply a custom number format without changing the cell value?
Select your cell, press Ctrl+1 to open the Format Cells dialog, navigate to the Custom category, and enter your format code (e.g., '0.00'). The underlying value remains unchanged for calculations.
Can I use custom formatting to add text strings to a number?
Yes. In the Custom Number Format dialog, you can append text by enclosing it in quotation marks. For example, formatting a cell with 0 "Units" will display '5 Units' while keeping the underlying value as the number 5 for future arithmetic.




