1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Sub Copie()
Dim nbLignes As Long
Application.Calculation = xlCalculationManual 'passe en mode calcul manuel
Worksheets("sheet1").Activate 'Pas vraiment nécessaire si on la nomme expressément...
nbLignes = Cells(Rows.Count, "A").End(xlUp).Row
Range("B3:B" & nbLignes).Formula = "=VLookup(A3, Page5_1!$A$3:$H$106, 2, FALSE)"
Range("C3:C" & nbLignes).Formula = "=VLookup(A3, Page5_1!$A$3:$H$106, 3, FALSE)"
Range("D3:D" & nbLignes).Formula = "=VLookup(A3, Page5_1!$A$3:$H$106, 4, FALSE)"
Application.Calculation = xlCalculationAutomatic 'passe en mode calcul automatique pour mettre à jour les formules une seule fois
Range("B2:Z" & nbLignes).copy
Range("B2:Z" & nbLignes).PasteSpecial xlPasteValues
Range("A1").Select
Application.CutCopyMode = False
End Sub |