Draw arrow from one cell edge to another cell edge

excel

Solution

To add manually (in Excel):

- Older Excel versions: Go to the Insert menu -> Shapes -> Arrow

- Excel 2016+: Go to the Insert menu -> Illustrations -> Shapes -> select an arrow type.

Position the arrow on the sheet and use the grips to adjust the position.

or with VBA:

ActiveSheet.Shapes.AddConnector( msoConnectorStraight, _
    Range("B2").Left, Range("B2").Top, Range("C10").Left, Range("C10").Top ).Select
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadOpen

Adjust to the cells you want...

- Documentation from Microsoft: Shapes.AddConnector method (Excel)

Problem

In Excel, I want to draw an arrow from cell B2, right side, to cell C10, left side. This arrow should be coupled to the cells, so if I resize the cells, or cut-paste them to a new place, the arrow should move as well. Is there any way to accomplish this? p.s. I would settle for a line instead of an arrow if this is easier.

Original source