Sub replaceiID2()
Dim i%, derligne%, x2, x3, ta
On Error Resume Next
derligne = Cells(Rows.Count, 2).End(3).Row
ReDim ta(1 To 1000, 1 To 1)
'--suppression de WG EXPIRED
For i = 2 To derligne
Cells(i, 2) = Replace(Cells(i, 2), "WG: Expired ", "")
Next i
'--extraction de la valeur après le premier ID
For i = 2 To derligne
Cells(i, 4) = "": x3 = ""
x2 = Split(Cells(i, 3), "ID: ")
x3 = Left(x2(1), 4)
ta(i - 1, 1) = x3
Next i
Cells(2, 3).Resize(UBound(ta, 1), 1) = ta
'--mise en forme du tableau (à ajuster)
Columns("A:C").EntireColumn.AutoFit
Rows("2:" & derligne).EntireRow.AutoFit
Range("B5").Select
End Sub