daniel22bg
New Member
- Joined
- Nov 21, 2008
- Messages
- 31
Hi there,
I need to have e multiple range that is updating itself with each spinning of the loop. Something like this (skipping the unimportant parts):
I have a problem with this part "Set UnionRng = Union(UnionRng, SelectRng)". I know that this is possible im MATLAB but it seems that VBA is not supporting such functionality. Is there any way that I can get around it? Thanks
I need to have e multiple range that is updating itself with each spinning of the loop. Something like this (skipping the unimportant parts):
Code:
Dim UnionRng, SlectRng as Range
Set UnionRng = Nothing
For j = 1 To 50
SelectCol = j + 20
Set SelectRng = Range(Cells(2, SelectCol), Cells(100, SelectCol))
Set UnionRng = Union(UnionRng, SelectRng)
Next j
I have a problem with this part "Set UnionRng = Union(UnionRng, SelectRng)". I know that this is possible im MATLAB but it seems that VBA is not supporting such functionality. Is there any way that I can get around it? Thanks