Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi, i have this code that will select from active sheet 20 cells below, on
the column. can this code be made to select 20 cells to the right, on row? Range(ActiveCell, Cells(ActiveCell.Row + 20, ActiveCell.Column)).Select Can this be done? Thanks! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Your line of code can be simplified to ActiveCell.Resize(21).Select and for a column ActiveCell.Resize(, 21).Select My usual caveat is that no matter what you trying to do it's extremely unlikely you need to select to do it -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "puiuluipui" wrote: Hi, i have this code that will select from active sheet 20 cells below, on the column. can this code be made to select 20 cells to the right, on row? Range(ActiveCell, Cells(ActiveCell.Row + 20, ActiveCell.Column)).Select Can this be done? Thanks! |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
and you can combine both
ActiveCell.Resize(21, 21).Select -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Mike H" wrote: Hi, Your line of code can be simplified to ActiveCell.Resize(21).Select and for a column ActiveCell.Resize(, 21).Select My usual caveat is that no matter what you trying to do it's extremely unlikely you need to select to do it -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "puiuluipui" wrote: Hi, i have this code that will select from active sheet 20 cells below, on the column. can this code be made to select 20 cells to the right, on row? Range(ActiveCell, Cells(ActiveCell.Row + 20, ActiveCell.Column)).Select Can this be done? Thanks! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
It's working great!!
Thanks! "Mike H" wrote: Hi, Your line of code can be simplified to ActiveCell.Resize(21).Select and for a column ActiveCell.Resize(, 21).Select My usual caveat is that no matter what you trying to do it's extremely unlikely you need to select to do it -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "puiuluipui" wrote: Hi, i have this code that will select from active sheet 20 cells below, on the column. can this code be made to select 20 cells to the right, on row? Range(ActiveCell, Cells(ActiveCell.Row + 20, ActiveCell.Column)).Select Can this be done? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
move from active cell offset in macro | Excel Discussion (Misc queries) | |||
Active cell position for macro | Excel Worksheet Functions | |||
how to create a macro that references the currently active cell | Excel Worksheet Functions | |||
copy name from active sheet to cell - using macro or function | Excel Worksheet Functions | |||
macro- move down to empty cell & active worksheet | Excel Worksheet Functions |