Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting simple range relative to the active cell. jmac68 Excel Programming 2 November 29th 06 12:50 AM
Selecting Range in non-active sheet [email protected] Excel Programming 0 March 27th 06 01:44 PM
Range selecting in non-active workbook SJC[_2_] Excel Programming 3 December 30th 05 01:55 PM
Selecting an active cell TimT Excel Programming 3 October 27th 05 07:08 PM
selecting a cell relative to activecell in an excel macro Zogann Excel Programming 1 October 17th 03 12:20 PM


All times are GMT +1. The time now is 02:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"