Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 391
Default Selecting A Range

Dim rTable As Range
Dim WS As Worksheet
Set WS = ActiveSheet

Set rTable = WS.Cells.CurrentRegion

Now you have rTable in memory referencing the sheet
region. Don't forget that you can manipulate data easily
without necessarily having the sheet active nor the cells
selected. The code above works whatever sheet is active.

Patrick Molloy
Microsoft Excel MVP


-----Original Message-----
I am trying to write some code that will look at the
uppermost cell in a range of cells, and then select the
range of cells that belong to the same bunch of data
(i.e. all the way to the right of the initial cell until
the range ends, and all the way to the bottom of the
initial cell until the range ends). Any help would be
greatly appreciated. Thanks.

Jason
.

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 a range Garth Excel Discussion (Misc queries) 2 March 4th 09 08:40 PM
Please help with selecting a range keri Excel Discussion (Misc queries) 7 December 12th 06 08:56 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Selecting a Range SJT Excel Discussion (Misc queries) 2 March 8th 06 07:30 PM
Selecting A Range John Wilson Excel Programming 0 July 22nd 03 03:05 AM


All times are GMT +1. The time now is 06:04 AM.

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"