Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When i used the CTRL and SHIFT key to multiple select some rows, ex: Row 1,
5, 7,11. How do i to check how many rows has been selected? like return 4. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi OKLover,
Try: Sub Tester1() Dim rng As Range, Ar As Range, rw As Range Dim iCtr As Long Set rng = Selection For Each Ar In rng.Areas For Each rw In Ar.Rows iCtr = iCtr + 1 Next rw Next Ar MsgBox "There are " & iCtr & " rows in the selection" End Sub --- Regards, Norman "OKLover" wrote in message ... When i used the CTRL and SHIFT key to multiple select some rows, ex: Row 1, 5, 7,11. How do i to check how many rows has been selected? like return 4. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One option if you do in fact have entire rows selected:
N = Intersect(Selection, Columns(1)).Cells.Count or to be safe: N = Intersect(Selection.EntireRow, Columns(1)).Cells.Count HTH -- Dana DeLouis Win XP & Office 2003 "OKLover" wrote in message ... When i used the CTRL and SHIFT key to multiple select some rows, ex: Row 1, 5, 7,11. How do i to check how many rows has been selected? like return 4. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Wonderful! you are so COOOOOOOOL ~
"Dana DeLouis" bl... One option if you do in fact have entire rows selected: N = Intersect(Selection, Columns(1)).Cells.Count or to be safe: N = Intersect(Selection.EntireRow, Columns(1)).Cells.Count HTH -- Dana DeLouis Win XP & Office 2003 "OKLover" wrote in message ... When i used the CTRL and SHIFT key to multiple select some rows, ex: Row 1, 5, 7,11. How do i to check how many rows has been selected? like return 4. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
More than selected rows being highlighted | Excel Discussion (Misc queries) | |||
Color alternate rows when after hiding selected rows | Excel Worksheet Functions | |||
How many rows have I selected ? | Excel Worksheet Functions | |||
how many rows did I selected | Excel Worksheet Functions | |||
Delete non-selected rows | Excel Programming |