Sub VLOOKUPAuto()
Application.ScreenUpdating = False
' compte le nombre de lignes
Dim nbLignes As Integer
nbLignes = Application.WorksheetFunction.CountA(Range("A9:A65536"))
' boucles qui remplissent le tableau
For i = 9 To nbLignes
For j = 15 To 29
If CStr(Cells(i, j).Value) = "" Or CStr(Cells(i, j).Value) = "0" Then
Cells(i, j).Select
ActiveCell.Formula = "=VLOOKUP($A" & i & ";'C:\compilation\[valeurs_test.xls]AO'!$A$9:$AC$9085;" & j & ";FALSE)"
End If
Next j
Next i
Application.ScreenUpdating = True
End Sub