How to Make an Excel IF Formula Return Blank for Empty Cells
Question details
The user needs an Excel IF formula that returns a blank for empty cells, 'TRANSFER' for specific values (30-40-60), and 'BACS' for others, while resolving a #SPILL! error.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Writing a nested IF statement to categorize transfer types based on cell values without incorrectly populating blank rows.
- Observed behavior
- The current formula returns 'BACS' for empty rows and occasionally triggers a #SPILL! error when entered as an array.
Ensure that the target column where you plan to enter the formula or dynamic array is completely empty, as existing data will block the formula and cause a #SPILL! error.
Use a Row-Based Nested IF Formula
This is the most reliable method to return specific text or a blank cell based on the target column's value.
A nested IF formula allows you to evaluate multiple conditions sequentially. By checking if the cell is completely empty first, you prevent the formula from assigning a default fallback value (like 'BACS') to blank rows.
Click on the first cell in your output column (for example, row 7) where you want the result to appear.
Type the formula =IF(H7="30-40-60","TRANSFER",IF(H7="","","BACS")) into the formula bar.
Press Enter to execute the formula for that specific row.
Click and drag the fill handle (the small square at the bottom-right corner of the selected cell) down to apply the formula to the rest of the rows in your dataset.

Clear the Spill Range for Dynamic Array Formulas
If you are applying the formula to an entire column at once using newer versions of Excel, you must clear obstructing cells to resolve the #SPILL! error.
Easily Manage Formulas and Arrays with WPS Spreadsheet
WPS Spreadsheet provides robust support for advanced formulas, nested IF statements, and dynamic arrays. You can seamlessly write and drag your logical formulas to handle blank cells without worrying about complex array errors.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your workbook containing the data.
- 2. Enter your nested formula: Select the target cell and type your nested IF formula, properly handling blanks with empty quotation marks ("").
- 3. Auto-fill your data: Drag the fill handle to copy the formula down, or leverage WPS's array features for automatic population.
- 4. Diagnose errors instantly: Use the built-in Error Checking tool if any array blocks occur, allowing you to instantly locate and clear obstructing cells.

Frequently Asked Questions
Why does my IF formula return a 0 instead of a blank cell?
If your formula references an empty cell without explicitly defining what to do, the spreadsheet program may default to displaying a 0. Ensure you include a condition like IF(A1="","",...) to force it to return a completely blank value.
How do I make an IF function return a blank if a cell contains a specific word?
You can adjust the logical test to look for that specific word. For example, the formula =IF(A1="SpecificWord","", "OtherValue") will leave the destination cell blank if 'SpecificWord' is found in cell A1.
What does the #SPILL! error mean in spreadsheet formulas?
The #SPILL! error indicates that a formula has produced multiple values (a dynamic array), but the neighboring cells where those values need to be displayed are not empty. Clearing the blocking cells will resolve the issue.
Can I use ISBLANK instead of quotes to check for empty cells?
Yes, =IF(ISBLANK(H7),"","BACS") is an alternative way to check for empty cells. However, ISBLANK will return FALSE if the target cell contains a hidden formula or an invisible space, whereas checking with H7="" handles formula-generated blanks more effectively.




