Check if Cell is in a Range

From http://stackoverflow.com/questions/5183374/vba-test-if-cell-is-in-a-range
Returns True if Range1 is within Range2

The Code

Sub TheCode()

	If InRange(Target, rngData) Then
		'code goes here
	End If

End Sub

Function InRange(Range1 As Range, Range2 As Range) As Boolean

	InRange = Not (Application.Intersect(Range1, Range2) Is Nothing)
    
End Function