Sub Concatener()
Dim C As Range, i, j, k, val
Application.ScreenUpdating = False
Range("A2").Select
For Each C In Range("A2:A658")
'CODE MACRO QUI NE FONCTIONNE PAS
i = Right(C.Value, 2)
j = Right(C.Offset(0, 1).Value, 12)
k = Right(C.Offset(0, 2).Value, 3)
val = i & j & k
C.Offset(0, 4) = "'" & val
'Stop
'ActiveCell.Offset(0, 4) = Right(ActiveCell.Value, 2) & Right(ActiveCell.Offset(0, 1).Value, 12) & Right(ActiveCell.Offset(0, 3).Value, 3)
'AVEC FORMULE CELA FONCTIONNE
ActiveCell.Offset(0, 5).FormulaR1C1 = "=RIGHT(RC[-5],2)&RIGHT(RC[-4],12)&RIGHT(RC[-3],3)"
'VERIFICATION SI CONCORDANCE ENTRE LES 2 METHODES
If ActiveCell.Offset(0, 4) = ActiveCell.Offset(0, 5) Then
ActiveCell.Offset(0, 6) = "OK"
Else
ActiveCell.Offset(0, 6) = "PAS OK"
End If
ActiveCell.Offset(1, 0).Select
Next C
Range("A1").Select
MsgBox ("Terminé")
Application.ScreenUpdating = True
End Sub