Window.RangeFromPoint (Excel)

Returns the Shape or Range shape that is positioned at the specified pair of screen coordinates. If there isn't a shape located at the specified coordinates, this method returns Nothing.

RangeFromPoint (x, y)

Dim lngx As Long: lngx = 
Dim lngy As Long: lngy = 
Dim shpRangeFromPoint As Shape
Set shpRangeFromPoint = ActiveWindow.RangeFromPoint(x:=lngx, y:=lngy)


The following arguments are required:

x (Long) - The value (in pixels) that represents the horizontal distance from the left edge of the screen, starting at the top.

y (Long) - The value (in pixels) that represents the vertical distance from the top of the screen, starting on the left.