Shino_skay
asked on
VBA - Excel Union Method: Setting Dynamic range
Hi,
I'm stuck trying to figure out how to use the union method on a dynamic range array.
I have an range array for a number of banks which changes from period over period. Instead of using
Set rngUnion = Union(rngBank(1), rngBank(2), rngBank(3), etc)
is there a way to set the rngUnion to the bounds of the array?
Unless there's a Set Preserve, I can't think of a loop for this. Thanks guys!
I'm stuck trying to figure out how to use the union method on a dynamic range array.
I have an range array for a number of banks which changes from period over period. Instead of using
Set rngUnion = Union(rngBank(1), rngBank(2), rngBank(3), etc)
is there a way to set the rngUnion to the bounds of the array?
Unless there's a Set Preserve, I can't think of a loop for this. Thanks guys!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
slow fingers :)
ASKER
oh, so you can set rngunion to union itself. That's the secret.... Thanks rorya and pat
ASKER
quick question guys, is it possible to use the worksheetfunction.rank or application evaluate and rank for a range that's been unioned? I'm getting errors on both attempts and wonder if its possible. Thanks.
Yes, that should work.