как с помощью макроса(VBA) вырезать из Ячейки A1 номер вагона (8 цифр) и перенести в ячейку B1
Sub iNomerWagon()
Dim Dict As Object
Dim i As Long
Dim iLastRow As Long
iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
Set Dict = CreateObject("scripting.dictionary"): Dict.comparemode = 1
With CreateObject("VBScript.RegExp")
.Global = True
.IgnoreCase = True
.MultiLine = True
.Pattern = "\d{8}"
For i = 2 To iLastRow
If .test(Cells(i, 1)) Then
Cells(i, "B") = .Execute(Cells(i, "A"))(0)
Cells(i, "A") = .Replace(Cells(i, "A"), "")
End If
Next
End With
End Sub