Hello tout le monde
Je viens de terminer de bosser sur ton fichier, si ma solution te va.
Sub calcul()
'Calcul le nb transports
Set liste = CreateObject("scripting.dictionary")
Dim tablo() As Variant 'reprendre les valeurs non filtrées dans un tableau numérique à part et non directement d'excel
With Sheets("Feuil1")
nblg = Range(.Range("a1"), .Range("a1").End(xlDown).Address).SpecialCells(xlCellTypeVisible).Count 'compte nb ligne non filtré du tab
nbtour = Range("a1").End(xlDown).Row - Range("A1").Row + 1 'compte ligne du tableau au total pour le parcourir
ReDim tablo(1 To nblg, 1 To 3) 'def taille tab
For o = 1 To nbtour 'crea du tab
If .Range("a" & o).Rows.Hidden = False Then ligtab = ligtab + 1
If .Range("a" & o).Rows.Hidden = False Then tablo(ligtab, 1) = .Cells(o, 1).Value
If .Range("a" & o).Rows.Hidden = False Then tablo(ligtab, 2) = .Cells(o, 2).Value
If .Range("a" & o).Rows.Hidden = False Then tablo(ligtab, 3) = .Cells(o, 3).Value
Next
For i = 1 To UBound(tablo)
liste(tablo(i, 1) & "#" & tablo(i, 2)) = _
liste(tablo(i, 1) & "#" & tablo(i, 2)) + tablo(i, 3)
Next i
End With
Lig = 1
Sheets("Feuil2").Range("a1:c65000").ClearContents
With Sheets("Feuil2")
For Each k In liste.keys
.Cells(Lig, 1).Resize(1, 2) = Split(k, "#")
Lig = Lig + 1
Next k
.[C1].Resize(liste.Count, 1) = Application.Transpose(liste.items)
End With
End Sub