Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Selecting a range of cells in a macro
Can anyone help me with this please.
I have written an Excel (XP) macro that has to start by selecting a range based on the active cell and the 10 cells to its right. How do I put this into VBA code please? Thanks, V |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Selecting a range of cells in a macro
Here's one way:
Range(ActiveCell.Address & ":" & ActiveCell.Offset(0, 10).Address).Select Hope that helps. "Victor Delta" wrote: Can anyone help me with this please. I have written an Excel (XP) macro that has to start by selecting a range based on the active cell and the 10 cells to its right. How do I put this into VBA code please? Thanks, V |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Selecting a range of cells in a macro
activecell.resize(1,11).select
Victor Delta wrote: Can anyone help me with this please. I have written an Excel (XP) macro that has to start by selecting a range based on the active cell and the 10 cells to its right. How do I put this into VBA code please? Thanks, V -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Selecting a range of cells in a macro
And Dave Peterson's method is probably faster and more efficient than mine.
"Dave Peterson" wrote: activecell.resize(1,11).select Victor Delta wrote: Can anyone help me with this please. I have written an Excel (XP) macro that has to start by selecting a range based on the active cell and the 10 cells to its right. How do I put this into VBA code please? Thanks, V -- Dave Peterson |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Selecting a range of cells in a macro
But no matter which one is used, the OP should be able to read either to see how
each can be extended to different situations. JLatham wrote: And Dave Peterson's method is probably faster and more efficient than mine. "Dave Peterson" wrote: activecell.resize(1,11).select Victor Delta wrote: Can anyone help me with this please. I have written an Excel (XP) macro that has to start by selecting a range based on the active cell and the 10 cells to its right. How do I put this into VBA code please? Thanks, V -- Dave Peterson -- Dave Peterson |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Selecting a range of cells in a macro
"Dave Peterson" wrote in message
... But no matter which one is used, the OP should be able to read either to see how each can be extended to different situations. Very many thanks to you both. V |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
macro syntax for selecting variable range | Excel Discussion (Misc queries) | |||
Selecting a range of cells, how to ? | Excel Worksheet Functions | |||
Selecting a range of values on pivot table attribute with a macro | Excel Discussion (Misc queries) | |||
Range selecting cells | Excel Discussion (Misc queries) | |||
how to combine cells by selecting range? | New Users to Excel |