countif cell is not blank

mira2020

New Member
Joined
Sep 25, 2020
Messages
27
Office Version
  1. 2016
I use below formula to count non blank cell
=COUNTIF(BG5:BG6,"<>")

have formula on these cell, sometimes the formula return blank but my countif always count the cell because the formula is there

How to resolve it?

thanks,
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I use below formula to count non blank cell
=COUNTIF(BG5:BG6,"<>")

have formula on these cell, sometimes the formula return blank but my countif always count the cell because the formula is there

How to resolve it?

thanks,
just use COUNTA bro
 
Upvote 0
Try this:

=COUNTIF(BG5:BG6,"?*")+COUNT(BG5:BG6)

Or:

=SUMPRODUCT(--(LEN(BG5:BG6)>0))
 
Upvote 0
SumProduct and if you have MS 365 Filter seem to handle this the best, so on Excel 2016 try.
Excel Formula:
=SUMPRODUCT(--(BG5:BG6<>""))

@SanjayGMusafir - in your formula the "<>" is only excluding Empty/Blank Cells but the subtraction criteria "" is including both empty string ie "" AND empty/blank cells.
 
Upvote 0

Forum statistics

Threads
1,215,136
Messages
6,123,246
Members
449,093
Latest member
Vincent Khandagale

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top