[]
Returns an IRange object that represents the intersection of two ranges.
If range2 is from a different worksheet, an exception is thrown.
IRange Intersect(IRange range2)
Function Intersect(range2 As IRange) As IRange
| Type | Name | Description |
|---|---|---|
| IRange | range2 | The range to intersect with this range. |
| Type | Description |
|---|---|
| IRange | A new range which consists of the intersection of this range and range2, or null if the ranges do not intersect. |
Returns an IRange object that represents the intersection of several ranges.
If one or more ranges from a different worksheet are specified, an exception is thrown.
IRange Intersect(params IRange[] ranges)
Function Intersect(ParamArray ranges As IRange()) As IRange
| Type | Name | Description |
|---|---|---|
| IRange[] | ranges | The intersecting ranges. |
| Type | Description |
|---|---|
| IRange | A new range which consists of the intersection of this range and other ranges, or null if the ranges do not intersect. |