View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Kevin B
 
Posts: n/a
Default count for empty cells

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


--
Kevin Backmann


"tikchye_oldLearner57" wrote:

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
--
oldLearner57