Суббота, Сентябрь 19, 2020

Подсчет выделенных ячеек

Sub count()
    Dim CellCount As Double, RowCount As Double
    Dim ColCount As Double
    CellCount = Selection.count
    MsgBox "Выделено ячеек : " & CellCount
    RowCount = Selection.Rows.count
    MsgBox "Выделено строк : " & RowCount
    ColCount = Selection.Columns.count
    MsgBox "Выделено столбцов : " & ColCount
End Sub

Back to Top