Bonjour aux Passionnés !
J'aimerais savoir pourquoi ces deux fonctions présentent des anomalies [résultats incohérents; ou # VALEUR!]
Elles doivent être compatibles avec SOMMEPROD
Function souligneTxt(champ As Range)
For Each cell In champ
If cell.Font.Underline = xlUnderlineStyleSingle Then vSomme = vSomme + cell.Value
Next
souligneTxt = vSomme
End Function
…celle-ci est pire encore
Function soulrgTxt(champ As Range)
Application.Volatile
Dim temp()
ReDim temp(1 To champ.Count)
For i = 1 To champ.Count
temp(i) = champ(i).Font.Underline.ColorIndex
Next i
soulrgTxt = Application.Transpose(temp)
End Function
D'avance merci !
J'aimerais savoir pourquoi ces deux fonctions présentent des anomalies [résultats incohérents; ou # VALEUR!]
Elles doivent être compatibles avec SOMMEPROD
Function souligneTxt(champ As Range)
For Each cell In champ
If cell.Font.Underline = xlUnderlineStyleSingle Then vSomme = vSomme + cell.Value
Next
souligneTxt = vSomme
End Function
…celle-ci est pire encore
Function soulrgTxt(champ As Range)
Application.Volatile
Dim temp()
ReDim temp(1 To champ.Count)
For i = 1 To champ.Count
temp(i) = champ(i).Font.Underline.ColorIndex
Next i
soulrgTxt = Application.Transpose(temp)
End Function
D'avance merci !
Pièces jointes
Dernière édition: