B
balian
Guest
Bonjour, j'ai la macro suivante:
Sub NombredeCellulesbleues()
Dim Cellule As Range
Dim total As Variant
For Each Cellule In Selection
If Cellule.Interior.ColorIndex = 5 Then 'bleu
total = total + Cellule.Count
End If
Next
MsgBox "Il y a " & total & " Cellules bleues"
Range("A10") = total
End Sub
La question est si je peux la faire exécuté automatiquement pour chacune des colonnes de mon tableau et qu'elle indique le nombre au bas de la colonne. Donc, lorsqu'il y aura un changement, le nombre au bas de la colonne va changer automatiquement.
Merci de votre aide 😉
Sub NombredeCellulesbleues()
Dim Cellule As Range
Dim total As Variant
For Each Cellule In Selection
If Cellule.Interior.ColorIndex = 5 Then 'bleu
total = total + Cellule.Count
End If
Next
MsgBox "Il y a " & total & " Cellules bleues"
Range("A10") = total
End Sub
La question est si je peux la faire exécuté automatiquement pour chacune des colonnes de mon tableau et qu'elle indique le nombre au bas de la colonne. Donc, lorsqu'il y aura un changement, le nombre au bas de la colonne va changer automatiquement.
Merci de votre aide 😉