Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
multiple selection problem
How can i code muliple selections say i want to select rows 3,5,7
together like Rows(3).select Rows(5).select Rows(7).select ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
multiple selection problem
One way
Sub test() Range("a3,a5,a7").EntireRow.Select End Sub -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "XLNT" wrote in message ... How can i code muliple selections say i want to select rows 3,5,7 together like Rows(3).select Rows(5).select Rows(7).select ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
multiple selection problem
Use Union
for i = 3 to 7 step 2 if rng is nothing then set rng = Rows(i) else set rng = Union(rng,rows(i)) Next or set rng = Range("A3,A5,A7").EntireRow demo from the immediate window: set rng = Range("A3,A5,A7").EntireRow ? rng.Address $3:$3,$5:$5,$7:$7 so also set rng = Range("3:3,5:5,7:7") demo from the immediate window: set rng = Range("3:3,5:5,7:7") ? rng.Address $3:$3,$5:$5,$7:$7 -- Regards, Tom Ogilvy "XLNT" wrote in message ... How can i code muliple selections say i want to select rows 3,5,7 together like Rows(3).select Rows(5).select Rows(7).select ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selection problem | Excel Discussion (Misc queries) | |||
Excell Row Selection Problem | Excel Discussion (Misc queries) | |||
Cell selection problem | Excel Discussion (Misc queries) | |||
Selection mode problem | New Users to Excel | |||
Cannot Group that selection Problem | Excel Discussion (Misc queries) |