Discussion: Nbsi multi plages
Afficher un message
Vieux 10/05/2008, 18h40   #3 (permalink)
BOISGONTIER
XLDnaute Accro
 
Date d'inscription: septembre 2007
Messages: 1 344
Par défaut Re : Nbsi multi plages

Bonjour,


Code:
Function NbSiMZ(champrech As Range, valCherchée)
  Application.Volatile
  temp = 0  
  For i = 1 To champrech.Areas.Count
    For j = 1 To champrech.Areas(i).Count
      If valCherchée = champrech.Areas(i)(j) Then
        temp = temp + 1
      End If
    Next j
  Next i
  NbSiMZ = temp
End Function
JB
Formation Excel VBA JB
Fichiers attachés
Type de fichier : xls FonctionNbSiMZx.xls (38,5 Ko, 19 affichages)
BOISGONTIER est déconnecté   Réponse avec citation