Sub MaFonction()
Dim i As Long
Dim j As Long
Dim rayon As String
Dim sousrayon As String
Dim valeur As String
i = 3
j = 3
While Not Feuil1.Cells(i, 1) = ""
i = i + 1
Wend
i = i - 1
While Not j = 30
rayon = Feuil1.Cells(j, 1)
sousrayon = Feuil1.Cells(j, 2)
ActiveCell = Feuil1.Cells(j, 13)
ActiveCell.FormulaR1C1 = _
"=vlookup(G" & j & ",'[" & rayon & " Analyse 002.xls]" & sousrayon & " '!$C$14:$G$1000,4,false)"
j = j + 1
Wend
j = 3
While Not i - j
rayon = Feuil1.Cell(j, 1)
ActiveCell = Feuil1.Cells(j, 14)
ActiveCell.FormulaR1C1 = _
"=vlookup(G" & j & ",'[fichier.xls]" & rayon & " '!$J$4:$BE$1000,48,false)*12"
j = j + 1
Wend
End Sub