I was able to write a code which finds 6 digit numbers within the string and copy it into next column but I would like to add search which also can find numbers with pattern ##-#### and copy it into next column, example below:
Can somebody help me?
Sub Pull_6_Digit_Numbers_From_String()
Dim r As Range, i As Long
With CreateObject("VBScript.RegExp")
.Global = True
.Pattern = "\b\d{6}\b"
For Each r In Range("A1", Range("A" & Rows.Count).End(xlUp))
If .test(r.Value) Then
For i = 0 To .Execute(r.Value).Count - 1
r(, i + 2).Value = .Execute(r.Value)(i)
Next
End If
Next
End With

\b\d{2}-?\d{4}\b