Y
yeekiat
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
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