This is the sample dataset.
Method 1 – Using the IF Function to Determine If a Cell Is Not Blank
To see ‘Done’ in non-blank cells and ‘Pending’ in blank cells.
Step 1:
- Select D5.
- Enter the formula:
=IF(C5<>"","Done","Pending")
- Press Enter.
Step 2:
- Drag down the Fill Handle to see the result in the rest of the cells.
This is the output.
Read More: How to Check If Cell Is Empty in Excel
Method 2 – Utilizing the ISBLANK Function
To see TRUE in empty cells and FALSE in non-empty cells:
Steps:
- Select D5.
- Enter the formula:
=ISBLANK(C5)
- Press Enter.
- Drag down the Fill Handle to see the result in the rest of the cells.
This is the output.
Method 3 – Using the IF and ISBLANK Functions
Steps:
- Select D5.
- Enter the formula:
=IF(ISBLANK(C5),"Pending","Done")
- Press Enter.
- Drag down the Fill Handle to see the result in the rest of the cells.
This is the output.
Formula Breakdown:
➥ ISBLANK(C5)
checks if C5 is empty. For blank cells, it returns TRUE and for non-blank cells, FALSE.
FALSE
➥ IF(ISBLANK(C5),”Pending”,”Done”)
returns Done for FALSE and Pending for TRUE. The output is:
“Done”
Method 4 – Combining the IF, NOT, And ISBLANK Functions
Steps:
- Select D5.
- Enter the formula:
=IF(NOT(ISBLANK(C5)),"Done","Pending")
- Press Enter.
- Drag down the Fill Handle to see the result in the rest of the cells.
This is the output.
Formula Breakdown:
➥ ISBLANK(C5)
checks if C5 is empty and returns TRUE for blank cells. Otherwise, FALSE–
FALSE
➥ NOT(ISBLANK(C5))
returns the opposite value of the output of the ISBLANK function:
TRUE
➥ IF(NOT(ISBLANK(C5)),”Done”,”Pending”)
returns Done for TRUE and Pending for FALSE:
“Done”
Counting the Number of Non-Blank Cells in Excel
Method 1 – Using the COUNTA Function to Count Non-Blank Cells
Steps:
- Select D14.
- Enter the formula:
=COUNTA(C5:C12)
- Press Enter.
Method 2 – Applying the COUNTIF Function
Steps:
- Select D14
- Enter the formula:
=COUNTIF(C5:C12,"<>")
- Press Enter.
Method 3 – Using the COUNTIFS Function to Calculate the Number of Non-Blank Cells
Steps:
- Select D14.
- Enter the formula:
=COUNTIFS(C5:C12,">100",C5:C12,"<>")
- Press Enter.
Download Practice Book
Download the free Excel template.
Related Articles
- How to Check If Cell Is Empty Using Excel VBA
- Excel VBA: Check If Multiple Cells Are Empty
- How to Return Value If Cell is Blank
- How to Apply Conditional Formatting in Excel If Another Cell Is Blank
- If a Cell Is Blank then Copy Another Cell in Excel
- Excel If Two Cells Are Blank Then Return Value
- If Cell is Blank Then Show 0 in Excel
- How to Calculate in Excel If Cells are Not Blank
<< Go Back to Excel Cells | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!
This article was very useful. I could learn few useful tips from it.
Hello, Chan!
Hope you are doing well. Glad to know that our content is useful for you.
Regards
ExcelDemy