Use a Default Cell Unless Another Cell Contains a Number in Excel
Question details
Return a default cell value until a second cell contains a numeric replacement.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A1 holds the default value, and A2 may later hold a replacement number that is higher or lower.
- Observed behavior
- The result should show A1 while A2 is blank and switch to A2 when A2 contains a number.
Identify the default cell and the replacement cell. Choose a separate cell for the result so the formula does not refer to itself.
Switch to the replacement cell only when it contains a number
Use IF and ISNUMBER when the replacement cell may also contain text or other nonnumeric values.
Click a blank cell such as A3, separate from the default value in A1 and the replacement value in A2.
Type =IF(ISNUMBER(A2),A2,A1) in A3 and press Enter.
Leave A2 blank to display A1, then enter a number in A2 to display the replacement. The number can be higher or lower than A1.

Use the replacement cell whenever it is not blank
Use this shorter formula if A2 will contain only a number or a blank value.
Use the same conditional cell formula in WPS Spreadsheets
In WPS Spreadsheets, use IF and ISNUMBER to display a default value until another cell contains a numeric replacement.
- 1. Open a spreadsheet: Launch WPS Office, open Spreadsheets, and open an existing workbook or create a blank one.
- 2. Set up the cells: Enter the default value in A1 and leave A2 blank for the replacement.
- 3. Add the formula: Click A3, type =IF(ISNUMBER(A2),A2,A1), and press Enter.
- 4. Try a replacement: Enter a number in A2 and check that A3 displays it instead of A1.

Frequently Asked Questions
Will the formula work if the replacement is lower than the default?
Yes. Enter any numeric value in A2, and =IF(ISNUMBER(A2),A2,A1) returns it regardless of whether it is higher or lower than A1.
What happens if the replacement cell contains zero?
Zero is a number, so =IF(ISNUMBER(A2),A2,A1) returns 0 when A2 contains numeric zero.
What if A2 contains a formula that returns an empty string?
Both =IF(ISNUMBER(A2),A2,A1) and =IF(A2="",A1,A2) return A1 when A2 evaluates to an empty string.
Why does the formula ignore a number typed as text?
ISNUMBER returns FALSE for numbers stored as text. Convert the value in A2 to a number, for example by selecting the cell and using Excel's Convert to Number warning option when available.




