Sub CountRows() Dim myCount As Integer myCount = Selection.Rows.Count MsgBox "This selection contains " & myCount & " row(s)", vbInformation, "Count Rows" End Sub