1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Sub TTT()
Dim Arr_commentaire, dern As Long, r As Long, rr As Long
With Sheets("comments")
dern = .Range("A" & .Rows.Count).End(xlUp).Row
Arr_commentaire = .Range("A2:E" & dern)
End With
With Workbooks("suivi.xlsm").Sheets("extraction")
dern = .Range("A" & .Rows.Count).End(xlUp).Row
Arr_comment = .Range("A2:CP" & dern)
For r = 1 To UBound(Arr_commentaire, 1)
If Arr_commentaire(r, 3) <> "" Then
For rr = 1 To UBound(Arr_comment, 1)
If Arr_comment(rr, 1) = Arr_commentaire(r, 1) Then
Arr_comment(rr, 92) = Arr_commentaire(r, 3)
Arr_comment(rr, 93) = Arr_commentaire(r, 4)
Arr_comment(rr, 94) = Arr_commentaire(r, 5)
End If
Next rr
End If
Next r
.Range("A2").Resize(UBound(Arr_comment, 1), UBound(Arr_comment, 2)) = Arr_comment
End With
End Sub |
Partager