Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
And if the range is a collection of rows instead of cells, something
like the following will work to count the rows: Dim rng As Range Dim wks As Worksheet Set wks = ActiveSheet Set rng = wks.Range("B2:C100").Rows MsgBox rng.Count Alan Beban Jim Thomlinson wrote: Count is the property of a range. so something like this will work Dim rng As Range Dim wks As Worksheet Set wks = ActiveSheet Set rng = wks.Range("B2:B100") MsgBox rng.Count HTH Jim Thomlinson "PC" wrote: I'm using "Selection.Count" to count the number of cells in a range. How would I do this without actually visibly selecting the range i.e. I don't want the active cell to change from that selected by the user when they started my procedure. thanks ...pc |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
COUNT NUMBER OF ROWS | Excel Worksheet Functions | |||
Count number of rows, where non relevant rows are hidden | Excel Discussion (Misc queries) | |||
Count rows and insert number to count them. | Excel Discussion (Misc queries) | |||
Selecting a large number of rows, but not all | New Users to Excel | |||
Auto selecting the number of rows! | Excel Programming |