Bonjour tout le monde
svp pouvez vous m'aider
je un petit souci avec un macro
j'ai un tableau de ("C9:F106") exemple
après traitement et synthése j' aurai cela a la ligne (C117
je voudrais pouvoir exécuté ce code même si la colonne ("C9;106") est masqué il affiche qu'a même les résultat à la ligne C117
voilà le code que j'utilise qui bug quand je masue les cellules (c9;106)
Private Sub CommandButton3_Click()
'afficher resultat sans doublon
Set d1 = CreateObject("Scripting.Dictionary")
a = Range("C9:T" & [C106].End(xlUp).Row) 'le tableau concerné
j = 0
For I = LBound(a) To UBound(a)
If Not d1.exists(a(I, 1)) Then j = j + 1: d1(a(I, 1)) = j
Next I
Dim b(): ReDim b(1 To d1.Count, 1 To UBound(a, 2))
For ligne = LBound(a) To UBound(a)
p = d1(a(ligne, 1))
b(p, 18) = b(p, 18) + a(ligne, 18)
b(p, 17) = b(p, 17) + a(ligne, 17)
b(p, 16) = b(p, 16) + a(ligne, 16)
b(p, 15) = b(p, 15) + a(ligne, 15)
b(p, 14) = b(p, 14) + a(ligne, 14)
b(p, 13) = b(p, 13) + a(ligne, 13)
b(p, 12) = b(p, 12) + a(ligne, 12)
b(p, 11) = b(p, 11) + a(ligne, 11)
b(p, 10) = b(p, 10) + a(ligne, 10)
b(p, 9) = b(p, 9) + a(ligne, 9)
b(p, 8) = b(p, 8) + a(ligne, 8)
b(p, 7) = b(p, 7) + a(ligne, 7)
b(p, 6) = b(p, 6) + a(ligne, 6)
b(p, 5) = b(p, 5) + a(ligne, 5)
b(p, 4) = b(p, 4) + a(ligne, 4)
b(p, 2) = b(p, 2) + a(ligne, 2)
b(p, 3) = b(p, 3) + a(ligne, 3)
b(p, 1) = a(ligne, 1)
Next ligne
[C117].Resize(UBound(b), UBound(b, 2)) = b
End Sub