とりあえず、シート上に図形が2つの条件で
Sub Macro1()
Dim Sh As Shape
i = 0
For Each Sh In ActiveSheet.Shapes
Ybottom = Sh.Top + Sh.Height
Ytop = 200
X = Sh.Left + Sh.Width / 2
If i - Int(i / 2) * 2 = 0 Then
X1 = X
Else
X2 = X
End If
ActiveSheet.Shapes.AddConnector(msoConnectorStraight, X, Ybottom, X, Ytop).Select
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 2.25
.DashStyle = msoLineDash
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 0
End With
i = i + 1
Next
ActiveSheet.Shapes.AddConnector(msoConnectorStraight, X1, 250, X2, 250).Select
Selection.ShapeRange.Line.BeginArrowheadStyle = msoArrowheadOpen
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadOpen
With Selection.ShapeRange.Line
.Visible = msoTrue
.Weight = 2.25
.ForeColor.RGB = RGB(0, 0, 0)
.Transparency = 0
End With
ActiveSheet.Shapes.AddShape(msoShapeRectangle, (X1 + X2) / 2 - 20, 220, 40, 20).Select
With Selection.ShapeRange.Fill
.Visible = msoTrue
.ForeColor.RGB = RGB(255, 255, 255)
.Transparency = 0
.Solid
End With
Selection.ShapeRange.Line.Visible = msoFalse
Selection.ShapeRange(1).TextFrame2.TextRange.Characters.Text = X2 - X1
Selection.ShapeRange.ShapeStyle = msoShapeStylePreset7
Selection.ShapeRange.Line.Visible = msoFalse
End Sub
線の高さや点線の長さはご自身で設定して決めてください。
(単位:mm)も難義な話ですので、実際に印刷してみて修正してください。