I am fairly sure this is not possible but I wanted to 'bounce it off' my fellow Excel experts to be sure.
When you have a range object that includes multiple non-contiguous ranges they are represented as child 'Area' objects of a master Range object. If you have multiple ranges which each contain multiple areas and you combine those ranges will you only get one 'level' or area objects or can each area object include multiple areas in a nested fashion ?
It appears to me, and common sense. that when a new range is created out of a union of combined ranges their multi-area reference notation is simply combined together so it appears as if you had selected all the areas in one range object. In which case it is not possible that one of more areas in a range will itself contain multiple areas.
Am I right ?
Microsoft ExcelMicrosoft ApplicationsSpreadsheets
Last Comment
AL_XResearch
8/22/2022 - Mon
Jeff Darling
I think one way to test this is to look at some VBA with a union of some ranges that overlap.
Dim Area1Rng As RangeDim Area2Rng As RangeDim Area3Rng As RangeDim Area4Rng As RangeSet Area1Rng = Range("Area1")Set Area2Rng = Range("Area2")Set Area3Rng = Range("Area3")Set Area4Rng = Range("Area4")For Each itm In Area1Rng lstRangesArea1.AddItem itm.AddressNextFor Each itm In Area2Rng lstRangesArea2.AddItem itm.AddressNextFor Each itm In Area3Rng lstRangesArea3.AddItem itm.AddressNextFor Each itm In Area4Rng lstRangesArea4.AddItem itm.AddressNextDim unionRng As RangeSet unionRng = Union(Area1Rng, Area2Rng, Area3Rng, Area4Rng)For Each itm In unionRng lstRangesUnion.AddItem itm.AddressNext
Open in new window
I predefined the ranges.