[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IRange.Intersect

Intersect Method

Intersect(IRange)

Returns an IRange object that represents the intersection of two ranges.
If range2 is from a different worksheet, an exception is thrown.

Declaration
IRange Intersect(IRange range2)
Function Intersect(range2 As IRange) As IRange
Parameters
Type Name Description
IRange range2

The range to intersect with this range.

Returns
Type Description
IRange

A new range which consists of the intersection of this range and range2, or null if the ranges do not intersect.

Intersect(params IRange[])

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.

Declaration
IRange Intersect(params IRange[] ranges)
Function Intersect(ParamArray ranges As IRange()) As IRange
Parameters
Type Name Description
IRange[] ranges

The intersecting ranges.

Returns
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.