Home > Articles > Computer Software > Business Office Software > Spreadsheet Software > Microsoft Excel

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

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

The Intersect method returns the cells that overlap between two or more ranges:

Application.Intersect(argument1, argument2, etc.)

The expression, Application, is not required. The following code colors the overlapping cells of the two ranges:

Set IntersectRange = Intersect(Range("Range1"), Range("Range2"))
IntersectRange.Interior.ColorIndex = 6
  • + Share This
  • 🔖 Save To Your Account