Excel Formula to Return Blank for Empty Cells and Mark Even Numbers
Question details
The user needs a formula that displays N/A for even numbers and a blank for odd numbers or empty cells.

- 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.
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.
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.
In Excel, click an empty cell such as B6 next to the value in A6.
Type =IF($A6="","",IF(ISEVEN($A6),"N/A","")) in the formula bar and press Enter.
Select B6 and drag its fill handle down to apply the formula to the remaining rows.
Enter an even number, an odd number, and a blank in column A to confirm that only the even number displays N/A.

Combine AND and ISEVEN for numeric cells
Use this shorter formula when the input cells contain numbers or are truly empty.
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. Open the workbook: Open WPS Spreadsheet and choose Open to select your workbook.
- 2. Select an output cell: Click an empty cell such as B6 next to the input in A6.
- 3. Enter the formula: Type =IF($A6="","",IF(ISEVEN($A6),"N/A","")) and press Enter.
- 4. Apply it to more rows: Drag the fill handle down from B6, then use File > Save or Save As to save the workbook.

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.




