VBA: Count the Columns in a Selection

August 14th, 2004 | Categories: Cells, Columns & Rows | Tags: , , ,
-->

If you ever need to count the number of Columns that were selected, use Selection.Columns.Count

Put this in a module:

Public Sub CountMyColumns()
MsgBox Selection.Columns.Count
End Sub
Can't get the tutorial to work for you? Need help with your code?
Get answers right away at our AE Excel Support Forums!
No comments yet.