Returns a count of the number of columns in a selection
Sub CountColumns() Dim myCount As Integer myCount = Selection.Columns.Count MsgBox "This selection contains " & myCount & " columns", vbInformation, "Count Columns" End Sub