How to Use COUNTIF for Cells Not Equal to Text or Blank in Excel – 5 Examples

This is a sample dataset of the electricity bill of a Store in the 1st 6 six months of 2021.

Dataset to Apply COUNTIF Not Equal to Text or Blank in Excel

The column Result was added to the dataset.

Result Column to Apply COUNTIF Function based on Criteria

 


Method 1 – Using the COUNTIF Function to Count Cells Not Equal to Blank 

Steps:

  • Select E5.
  • Enter the COUNTIF.
  • Select the range B5:C10 and provide a condition.
  • Set the condition Not equal (<>) in the 2nd argument. This is the formula.
=COUNTIF(B5:C10,"<>")

COUNTIF to Count Not Equal to Blank Cells in Excel

  • Press ENTER.

This is the output. There are 2 blank cells and 10 cells are non-zero.

Use of COUNTIF Function in Excel

Note: <> This sign means not equal. As no data is provided after it, it compares with blanks and returns non-blank cells.


Method 2 – Applying the COUNTIF Function to Count Cells That Do Not Contain Text

Steps:

  • Choose E5.
  • Enter the COUNTIF.
  • Select the range B5:C10 and provide a condition.
  • In the 2nd argument enter “ <>* ” and set this condition. The formula is:
=COUNTIF(B5:C10,"<>*")

Excel COUNTIF to Count Cells That Do Not Contain Text

  • Press ENTER.

The output displays the total count of cells that don’t have text value and the number of empty and numeric cells.

How to Apply COUNTIF Not Equal to Text or Blank in Excel


Method 3 – Utilizing the COUNTIF Function for Cells Not Equal to a Specific Text in Excel

Steps:

  • Enter the COUNTIF in E5
  • Select the range B5:C10.
  • In the 2nd argument enter “ <>Jan ”. Cells that don’t contain “Jan” will be counted and this condition will be set. The formula is:
=COUNTIF(B5:C10,"<>Jan")

COUNTIF Not Equal to Specific Text in Excel

  • Press ENTER.

11 is the output. Only 1 cell contains Jan. There are 11 cells that don’t have the text “Jan” will be counted and this condition will be set. The formula is:

 

Using COUNTIF Function for Counting Cells that Not Equal to Specific Text


Similar Readings


Method 4 – Combining the COUNTBLANK Function with the COUNTIF Function to Count Cells Not Equal to a Specific Text or Blank

Steps:

  • Select E5.
  • Enter the COUNTIF.
  • Select the range B5:C10.
  • In the 2nd argument enter “ <>Feb ”. Cells that don’t contain “Feb” will be counted and this condition will be set.
  • Enter the COUNTBLANK function.
  • Select the range B5:C10 and subtract it from the COUNTIF. The formula is:
=COUNTIF(B5:C10,"<>Feb")-COUNTBLANK(B5:C10)

Combine COUNTBLANK with COUNTIF Functions in Excel

  • Press ENTER.

Blank cells are not counted. Non-zero cells are displayed, excluding the cells containing ‘Feb‘.

Count Cells that Not Equal to Specific Text or Blank


Method 5 – Applying the COUNTIF Function to Count Cells Not Equal to Text or Blank

Steps:

  • Choose E5.
  • Enter the COUNTIF.
  • Select the range B5:C10 and provide a condition.
  • In the 2nd argument write “ <>* ”.
  • Subtract the COUNTBLANK function. For the COUNTBLANK function choose the range B5:C10. This is the formula:
=COUNTIF(B5:C10,"<>*")-COUNTBLANK(B5:C10)

Use of COUNTIF & COUNTBLANK Functions

  • Press ENTER.

This is the output. Only numeric values are counted.

Pressing ENTER to COUNTIF cells that Not Equal to Text or Blank in Excel


Practice Section

Practice here.

Practice Section to Apply COUNTIF Not Equal to Text or Blank in Excel


Download Practice Workbook

Download this practice workbook to exercise.


Related Articles


<< Go Back to COUNTIF Multiple Criteria | Excel COUNTIF Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Alok Paul
Alok Paul

Alok Paul has completed his B.Sc. in Electronics and Telecommunication Engineering from East West University. He has been working on the ExcelDemy project for more than 2 years. He has written 220+ articles and replied to numerous comments. He is experienced in Microsoft Office, especially in Excel. He also led some teams on Excel and VBA content development. He has a keen interest in Advanced Excel, Data analysis, Excel Pivot Table, Charts, and Dashboard. He loves to research... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo