Hello,
Below is the code I am using for searching for a string - cutting off first two characters and
then performing the search. The first part worked but how can the search be made for
the next 5 characters?
Thanks
Sub move()
Workbooks("work_data.xlsm").Activate
With ThisWorkbook.Sheets("Data before macro run")
Set Rng = .Range(.Range("A1"), .Cells(Rows.Count, 1).End(xlUp))
End With
For Each ce In Rng
Set findit = Range("D:D").Find(what:=CStr(Right(ce, Len(ce) - 2)))
arr = Split(findit.Offset(0, 1), " ")
ce.Offset(0, 4).Value = arr(0)
Next ce
End Sub
Bookmarks