count for empty cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hello community

can anyone in community tell me whether is there a function to count for
"empty" cells beside the Count (counting cells that has numeric data) and
CountA (counting of cells that had filled alphanumeric data)

thanks again for helping
 
Hi,

There is a function called COUNTBLANK in my function lists, that does that;
I am using Excel 2003, so I don't know if it was present in previous versions.

Miguel.
 
E.g. in range B1:B10
=COUNTIF(B1:B10,"")

Regards,
Stefi

„tikchye_oldLearner57†ezt írta:
 
You can use the following UDF to count your blank cells.

If you wanted to count the blank cells between A1 and A10 you would enter
the formula where you want the result in the following manner:

=CountBlanks(A1:A10)

Function CountBlanks(CellRange As Range) As Integer

Dim rng As Range
Dim iCounter As Integer
Dim iBlanks As Integer
Set rng = CellRange

Application.Volatile

For iCounter = 1 To rng.Cells.Count
If rng.Cells(iCounter).Value = "" Then iBlanks = _
iBlanks + 1
Next iCounter

Set rng = Nothing
CountBlanks = iBlanks
Exit Function

End Function
 
Be aware:

A cell can be blank, but not empty. In cell A1 enter:

=IF(1=1,"","")

countblank(A1) will return 1 even though the cell is not empty.

In VBA IsEmpty() will return true on truely empty.
 
thanks to Miguel Zapico , Stefi , Kevin B , Gary''s Student for the generous
assistance given :)

yes! so near yet so far - the function "countblank" is found inside the
function table
 
So in your opinion what's the best way to count a cell with no value, but a
cell that may have a formula? thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top