Function Problems

Use a Default Cell Unless Another Cell Contains a Number in Excel

Chanuka GeekiyanageChanuka Geekiyanage Dec 2, 2026 868 views

Question details

Return a default cell value until a second cell contains a numeric replacement.

Use a Default Cell Unless Another Cell Contains a Number in Excel
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.
Before you start

Identify the default cell and the replacement cell. Choose a separate cell for the result so the formula does not refer to itself.

Solution 1Recommended

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.

1
Select a result cell

Click a blank cell such as A3, separate from the default value in A1 and the replacement value in A2.

2
Enter the formula

Type =IF(ISNUMBER(A2),A2,A1) in A3 and press Enter.

3
Test the result

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.

Switch to the replacement cell only when it contains a number
Numbers stored as text: ISNUMBER does not treat a number stored as text as numeric. Convert it to a number if it should trigger the replacement.
WPS Spreadsheets

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. 1. Open a spreadsheet: Launch WPS Office, open Spreadsheets, and open an existing workbook or create a blank one.
  2. 2. Set up the cells: Enter the default value in A1 and leave A2 blank for the replacement.
  3. 3. Add the formula: Click A3, type =IF(ISNUMBER(A2),A2,A1), and press Enter.
  4. 4. Try a replacement: Enter a number in A2 and check that A3 displays it instead of A1.
Switch between default and replacement values with a formulaOpen and edit Microsoft Excel XLSX filesWork with familiar spreadsheet functions and a familiar interface
microsoft office alternative - wps office

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.