Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a range relative to an active cell
I'm trying to modify the code in a macro to let me select a range of cells
relative to an active cell. I know how to select a SINGLE cell relative to an active cell using OFFSET. For example, selecting a cell two columns to the right and on the same row as an active cell is accomplished with: ActiveCell.Offset(0,2).Select But I can't figure out how to use relative cells with RANGE. What if I wanted to select the cells that are two AND three columns to the right of an active cell? Thanks for any tips. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a range relative to an active cell
ActiveCell.Offset(0,2).Resize(,2).Select
-- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Steve Trombulak" wrote in message ... I'm trying to modify the code in a macro to let me select a range of cells relative to an active cell. I know how to select a SINGLE cell relative to an active cell using OFFSET. For example, selecting a cell two columns to the right and on the same row as an active cell is accomplished with: ActiveCell.Offset(0,2).Select But I can't figure out how to use relative cells with RANGE. What if I wanted to select the cells that are two AND three columns to the right of an active cell? Thanks for any tips. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Selecting a range relative to an active cell
Great, Bob. Thanks a bunch.
s "Bob Phillips" wrote: ActiveCell.Offset(0,2).Resize(,2).Select -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Steve Trombulak" wrote in message ... I'm trying to modify the code in a macro to let me select a range of cells relative to an active cell. I know how to select a SINGLE cell relative to an active cell using OFFSET. For example, selecting a cell two columns to the right and on the same row as an active cell is accomplished with: ActiveCell.Offset(0,2).Select But I can't figure out how to use relative cells with RANGE. What if I wanted to select the cells that are two AND three columns to the right of an active cell? Thanks for any tips. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting simple range relative to the active cell. | Excel Programming | |||
Selecting Range in non-active sheet | Excel Programming | |||
Range selecting in non-active workbook | Excel Programming | |||
Selecting an active cell | Excel Programming | |||
selecting a cell relative to activecell in an excel macro | Excel Programming |