PDA

View Full Version : [SOLVED:] Counting Cells



Jane
05-03-2005, 06:54 AM
Could anybody let me know how to make a function in Excel to count the number of cells with only value in a column excluding blank cells.

Jacob Hilderbrand
05-03-2005, 07:18 AM
Use the CountA function.


=CountA(A:A)

austenr
05-03-2005, 07:19 AM
Try this:


Sub CountNonBlankCells() 'Returns a count of non-blank cells in a selection
Dim myCount As Integer 'using the CountA ws function (all non-blanks)
myCount = Application.CountA(Selection)
MsgBox "The number of non-blank cell(s) in this selection is : "_
& myCount, vbInformation, "Count Cells"
End Sub

Jane
05-04-2005, 06:47 AM
Thanks everybody who has tried to help me to solve the question "counting cells"

Thanks!

Jacob Hilderbrand
05-04-2005, 09:55 AM
Glad to help :beerchug:

Take Care