Option Explicit
Sub ventile()
Dim a, i As Long, k As Byte, txt As String, dico As Object
'creation du dictionnaire parent
Set dico = CreateObject("Scripting.Dictionary")
dico.CompareMode = 1
With Sheets("Data Données Brute")
For i = 2 To 801 Step 20
'plage à traiter
a = .Range("A" & i & ": L" & i + 19).Value
'clé = nom de la feuille de destination
txt = "V 1000 % " & Left(a(2, 12), 2)
If Not dico.exists(txt) Then
'creation du dictionnaire enfant
Set dico(txt) = CreateObject("Scripting.Dictionary")
dico(txt).CompareMode = 1
End If
'clé = nom de la réunion
If Not dico(txt).exists(a(2, 12)) Then
'creation du dictionnaire petit enfant
Set dico(txt)(a(2, 12)) = CreateObject("Scripting.Dictionary")
dico(txt)(a(2, 12)).CompareMode = 1
End If
For k = 1 To UBound(a, 1)
If Not IsEmpty(a(k, 6)) Then
'clé = n° d'ordre d'arrivée converti pour la circonstance
a(k, 6) = a(k, 6) & IIf(a(k, 6) = 1, "er", "è")
If Not dico(txt)(a(2, 12)).exists(a(k, 6)) Then
'on affecte l'element soit le n° de dossard situé en colonne 11
dico(txt)(a(2, 12))(a(k, 6)) = a(k, 11)
End If
End If
Next
Next
End With
Set dico = Nothing
End Sub