I want to test if a given cell is within a given range in Excel VBA. What is the best way to do this?
From the Help:
Set isect = Application.Intersect(Range("rg1"), Range("rg2")) If isect Is Nothing Then MsgBox "Ranges do not intersect" Else isect.Select End If
2.1m questions
2.1m answers
60 comments
57.0k users