Single VBA Excel - Contando células selecionadas.

Pelos mais diversos motivos e situações, eventualmente precisamos saber quantas células estão selecionadas. Eis como fazê-lo..

Sub CntSelected()
    Dim cell As Object
    Dim count As Integer

    Let count = 0

    For Each cell In Selection
        Let count = count + 1
    Next cell

    MsgBox count & " item(ns) selecionados..."
End Sub

André Luiz Bernardes
A&A® - Work smart, not hard.