I found this code online and apparently it works for other people but not me? I don't know where it's wrong. I made a simple example and have my Range1 and Range 2 to be certain cells in excel,
Also, I would like to know if there is a way to return the intersections, if it can. Thanks in advance!
Function InRange(Range1 As Range, Range2 As Range) As Boolean
Set intersectRange = Application.Intersect(Range1, Range2)
If intersectRange Is Nothing Then
InRange = False
Else
InRange = True
End If
End Function