Based on your examples the following should work
Sub Macro1()
'Graham Mayor - https://www.gmayor.com - Last updated - 03 May 2020
Dim iStart As Integer, iEnd As Integer
Dim iSec As Integer, i As Integer, x As Integer
Dim sTest As String, sResult As String
Dim dResult As DataObject
Dim sSection As String
Dim oPara As Paragraph
Dim oRng As Range, oSec As Range
sTest = InputBox("Enter section number", "Section Number")
If IsNumeric(sTest) Then
iSec = CInt(sTest)
Else
Beep
MsgBox "Not a number"
Exit Sub
End If
sTest = InputBox("Enter start number", "Start Number")
If IsNumeric(sTest) Then
iStart = CInt(sTest)
Else
Beep
MsgBox "Not a number"
Exit Sub
End If
sTest = InputBox("Enter end number", "End Number")
If IsNumeric(sTest) Then
iEnd = CInt(sTest)
Else
Beep
MsgBox "Not a number"
Exit Sub
End If
sResult = "": sSection = ""
For i = 1 To Selection.Paragraphs.Count
Set oRng = Selection.Paragraphs(i).Range
oRng.MoveStartUntil "0123456789"
x = Len(CStr(iSec)) + Len(CStr(iStart)) + Len(CStr(iEnd)) + 1
oRng.MoveEndWhile "0123456789"
If Val(oRng.Text) = iSec Then
If sSection = "" Then
Set oSec = oRng.Paragraphs(1).Range
oSec.Collapse 1
oSec.MoveEndUntil "0123456789"
oSec.End = oSec.End + 1 + Len(CStr(iSec))
sSection = oSec.Text
End If
oRng.End = oRng.Paragraphs(1).Range.End - 1
oRng.Start = oRng.Start + x
sResult = sResult & oRng.Text & Chr(32)
End If
Next i
sResult = sSection & CStr(iStart) & "-" & CStr(iEnd) & Chr(32) & sResult
Set dResult = New DataObject
dResult.SetText sResult
dResult.PutInClipboard
MsgBox sResult & vbCr & vbCr & "Copied to clipboard"
lbl_Exit:
Set oRng = Nothing
Set oSec = Nothing
Set dResult = Nothing
Exit Sub
End Sub