Z.B. zeige mir wie oft "Heinz Müller" im Bereich A1:A25 zu finden ist. Das zu suchende Wort steht allerdings nicht allein in der Zelle. Countif fällt also flach...
Danke im Voraus,
Dirk
Public Function ZählenWieOft(ByVal such As String, ByVal Target As Range)
Dim cell As Range
Dim x, v, sum
For Each cell In Target
v = Split(cell, such)
If UBound(v) -1 Then sum = sum + UBound(v)
Next
ZählenWieOft = sum
End Function
Aufruf z.B. so:
=ZählenWieOft("Heinz Müller";A1:A6)
A | B | |
1 | Heinz Müller text Heinz Müller | 5 |
2 | Heinz Müller | |
3 | ||
4 | ||
5 | Heinz Müller text Heinz Müller | |
6 | ||
7 |
Formeln der Tabelle | ||||
|