Intersect Method Example

The function in this example returns True if the passed-in cell is inside the visible range.

Function IsCellVisible(testCell)
    Set vr = Spreadsheet1.ActiveSheet.VisibleRange
    Set ir = Spreadsheet1.Intersect(testCell, vr)
    'if the testCell is not in the visible range,
    'the intersection will be nothing
    IsCellVisible = Not ir Is Nothing
End Function