VBA/Excel/Access/Word/Excel/CountA

Материал из VB Эксперт
Перейти к: навигация, поиск

Returns a count of non-blank cells in a selection

 
Sub CountNonBlankCells()              
    Dim myCount As Integer                  
    myCount = Application.CountA(Selection)
    MsgBox "The number of non-blank cell(s) in this selection is :  " & myCount, vbInformation, "Count Cells"
End Sub