Using the Intersect Method to Create a New Range from Overlapping Ranges : Range Intersect « Excel « VBA / Excel / Access / Word






Using the Intersect Method to Create a New Range from Overlapping Ranges

 
Sub inter()
    Set IntersectRange = Intersect(range("Range1"), range("Range2"))
    IntersectRange.Interior.ColorIndex = 6
End Sub

 








Related examples in the same category

1.Use Intersect when you want to find the cells that are common to two or more ranges, or in other words, where the ranges overlap.