Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default Relative Ranges - Multiple Cells

I would like to select a range of cells from column A - column L, but
everytime I run the loop the starting row reference and the number of rows
will be different.

I've worked out a solution, but it will only work if I can get a relative
range to select multiple cells... something like this:

Range("A" & myMarks(k)).Activate
ActiveCell.Offset(0,0:Group, 11).Select

But it doesn't work... is there anything that will do the same job?




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Relative Ranges - Multiple Cells

Range("A" & myMarks(k)).Activate
ActiveCell.Resize(Group, 11).Select

assuming that group is the number of rows you want to select

or

Cells(MyMarks(k),"A").Resize(group,11).Select

--
Regards,
Tom Ogilvy


"Helen" wrote:

I would like to select a range of cells from column A - column L, but
everytime I run the loop the starting row reference and the number of rows
will be different.

I've worked out a solution, but it will only work if I can get a relative
range to select multiple cells... something like this:

Range("A" & myMarks(k)).Activate
ActiveCell.Offset(0,0:Group, 11).Select

But it doesn't work... is there anything that will do the same job?




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
Enter value zero into all cells in multiple ranges? Al Excel Discussion (Misc queries) 4 November 26th 09 06:34 AM
Counting Criteria in Cells in Multiple Ranges WalterK Excel Worksheet Functions 4 May 20th 08 03:33 AM
Add and Subtract ranges (with multiple cells) in vba Jon5001 Excel Programming 1 April 3rd 05 06:46 PM
changing multiple cells from relative to absolute reference Mike Excel Discussion (Misc queries) 4 March 10th 05 02:11 PM
select ranges of cells relative to location and then paste Buffyslay Excel Programming 3 June 22nd 04 05:00 PM


All times are GMT +1. The time now is 09:38 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"