Function Problems

Excel Formula to Return Blank for Empty Cells and Mark Even Numbers

Muhammad TalhaMuhammad Talha Dec 2, 2026 869 views

Question details

The user needs a formula that displays N/A for even numbers and a blank for odd numbers or empty cells.

Return Blank for Empty Cells and Mark Even Numbers in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet checks values in column A for odd or even numbers without showing a result for empty cells.
Observed behavior
The desired result is N/A for even numbers and a blank for odd numbers or empty cells.
Before you start

Identify the first input cell and an empty output cell for the formula. The examples use A6 as the input; replace that reference if your data starts elsewhere.

Solution 1Recommended

Use a nested IF formula to check for blanks first

Use this formula to leave empty cells and odd numbers blank while marking even numbers with N/A.

1
Select an output cell

In Excel, click an empty cell such as B6 next to the value in A6.

2
Enter the formula

Type =IF($A6="","",IF(ISEVEN($A6),"N/A","")) in the formula bar and press Enter.

3
Fill the formula down

Select B6 and drag its fill handle down to apply the formula to the remaining rows.

4
Check the results

Enter an even number, an odd number, and a blank in column A to confirm that only the even number displays N/A.

Use a nested IF formula to check for blanks first
How the formula treats zero: Zero is even, so a cell containing 0 displays N/A. The formula returns the text N/A, not the Excel #N/A error.
Try it in WPS Spreadsheet

Mark Even Numbers and Leave Blank Cells Empty in WPS Spreadsheet

Use the same nested IF and ISEVEN formula in WPS Spreadsheet to mark even numbers while leaving odd and empty cells blank.

  1. 1. Open the workbook: Open WPS Spreadsheet and choose Open to select your workbook.
  2. 2. Select an output cell: Click an empty cell such as B6 next to the input in A6.
  3. 3. Enter the formula: Type =IF($A6="","",IF(ISEVEN($A6),"N/A","")) and press Enter.
  4. 4. Apply it to more rows: Drag the fill handle down from B6, then use File > Save or Save As to save the workbook.
Check even numbers without displaying a result for blank cells.Open and edit Microsoft Excel XLSX and XLS files.Use familiar spreadsheet formulas and fill handles.Get started with WPS Office for free.
microsoft office alternative - wps office

Frequently Asked Questions

Why does zero display N/A in this formula?

ISEVEN treats 0 as an even number. The formula therefore returns N/A when the input cell contains 0, but returns a blank when the cell is empty.

Will the formula leave a cell blank if it contains a formula returning an empty string?

Yes. The nested formula =IF($A6="","",IF(ISEVEN($A6),"N/A","")) checks for an empty result before evaluating ISEVEN.

How can I mark odd numbers instead of even numbers?

Replace ISEVEN with ISODD: =IF($A6="","",IF(ISODD($A6),"N/A","")) in the output cell.

Why does the reference use $A6?

The dollar sign locks the reference to column A, while the row number changes when you fill the formula down. Change $A6 to match your input column and starting row.