Sub CountAllCells() Dim myCount As Integer myCount = Selection.Count MsgBox "The total number of cell(s) in this selection is : " _ & myCount, vbInformation, "Count Cells"End Sub