Christian0258
XLDnaute Accro
Bonjour à tout le forum,
Je souhaiterais votre aide afin d'adapter une fonction (de job75)...
Cette fonction compte des valeurs consécutives...ici "CA" =compte($D13:$AH13;"CA")
Comment faire pour compter des "CA" numérotés ?. type CA1, CA2 ect
voir fichier
Merci pour votre aide.
Bien à vous,
Christian
Function compte(r As Range, s$, Optional tf As Boolean = True)
Application.Volatile 'selon le besoin…
Dim tmp&, oCel As Range
For Each oCel In r
If oCel.Text <> "RH" And oCel.Text <> "F" Then
tmp = (Not IsEmpty(oCel)) * (tmp + 1) * ((oCel.Text = s) = tf)
compte = compte - (tmp > compte)
End If
Next
End Function
Je souhaiterais votre aide afin d'adapter une fonction (de job75)...
Cette fonction compte des valeurs consécutives...ici "CA" =compte($D13:$AH13;"CA")
Comment faire pour compter des "CA" numérotés ?. type CA1, CA2 ect
voir fichier
Merci pour votre aide.
Bien à vous,
Christian
Function compte(r As Range, s$, Optional tf As Boolean = True)
Application.Volatile 'selon le besoin…
Dim tmp&, oCel As Range
For Each oCel In r
If oCel.Text <> "RH" And oCel.Text <> "F" Then
tmp = (Not IsEmpty(oCel)) * (tmp + 1) * ((oCel.Text = s) = tf)
compte = compte - (tmp > compte)
End If
Next
End Function
Pièces jointes
Dernière édition: