1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Sub essai1()
Dim i, j As Integer
Dim Nom_feuille As Worksheet
ThisWorkbook.Activate
For j = 2 To Workbooks("Fichier_choisi.xlsx ").Worksheets.Count
Worksheets("Feul1 ").Cells(j, 1).Value = Workbooks(" Fichier choisi.xlsx ").Worksheets(j - 1).Name
If Worksheets(" Feuil1 ").Cells(j, 1).Value <> " " Then
Nom_feuille = Worksheets("Feuil1").Cells(j, 1).Value
Do While Cells(1, i).Value <> ""
ThisWorksheet.Cells((j + 1), 3).End(xlDown).Row.Value = Workbooks("Fichier_choisi.xlsx").Worksheets("Nom_feuille").Cells(1, i).Value
i = i + 1
Loop
End If
Next
End Sub |
Partager