Sub Listes()
Dim chemin$, dossier, col%, dos, lig&, fichier$, ligTotal&
chemin = ThisWorkbook.Path & "\" 'à adapter
dossier = Array("01 CP", "02 CE1", "03 CE2", "04 CM1", "05 CM2") 'tableau adaptable
Application.ScreenUpdating = False
Cells.Delete 'RAZ
col = 1
For Each dos In dossier
col = col + 1
Cells(1, col) = dos
lig = 2
fichier = Dir(chemin & dos & "\*.jpg") 'recherche des fichiers JPEG
While fichier <> ""
Cells(lig, col) = UCase(fichier)
lig = lig + 1
fichier = Dir
Wend
If lig > ligTotal Then ligTotal = lig
Next
Cells(ligTotal, 1) = "Total"
Cells(ligTotal, 2).Resize(, col - 1) = "=COUNTA(R1C:R[-1]C)-1"
Columns.AutoFit 'ajustement largeur
End Sub