LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Defining multiple ranges as one range

Hi,

I'm new here. cheers to anyone who can help me.

Is there a way for me to define multiple ranges as one range in vba?
The trick to this is that I am not sure how many of them are to be
grouped together as it is dyanamic and changes all the time.

For example. Lets say the ranges E7 to G7 are to be grouped together.
I wish to group all of them as one cell and give it a name such as
GroupedCells, so that I can run codes using Range
("GroupedCells").Value = blablabla.

I know some would suggest that I use Range("GroupedCells") = Range
("E7:G7") but that is not possible because sometimes it could be F7,
G7, H7, I7, etc. depending on whether that particular range is filled.

If it helps I do know how many ranges I'm expected to group. So if it
helps I know that for the case of E7 to G7, the number of cells is 3.

I'll be thankful if anyone can help me out.

Regards,
Yee Kiat
 
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
Defining Multiple "named" data ranges for Piot Tables in Excel 200 Fatih Can1968 Excel Discussion (Misc queries) 1 March 23rd 07 03:29 PM
Defining Ranges Steve Excel Worksheet Functions 5 May 28th 05 07:41 AM
Automatically Defining Ranges [email protected] Excel Programming 0 May 5th 05 09:13 PM
Re-defining Ranges in VBA aehan Excel Programming 3 March 24th 05 05:15 PM
Defining Ranges Greg Ghavalas Excel Programming 2 July 9th 03 10:10 PM


All times are GMT +1. The time now is 08:35 AM.

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

About Us

"It's about Microsoft Excel"