Hints and tips home » VBA hints and tips » Count the Rows and Columns in a Selection
Count the Rows and Columns in a Selection
If you need to count the number of rows or columns in a worksheet use the following code:
Selection.Rows.Count - Returns the number of rows in the selection
Selection.Columns.Count - Returns the number of columns in the selection
Selection.CurrentRegion.Rows.Count - Returns the number of rows in the current region of the selection
Added by Carlos on 24th November 2006
More VBA hints and tips, like:
|
Managing Stress : From A Manager's Perspective Any advice on reducing stress is usually targeted towards the individual. What if you're responsible for the levels of stress in your own employees, in your own workspace? Here are some tips on how to keep the stress down and the smiles up. » Article: Job stress management training |
» Forum post: Baselines |



Course updates

