Public Function MostOccuring(items() As Variant) As String
Dim count() As Integer
Dim strings() As Object
Dim Index As Integer
For Index = 0 To items.Length - 1
If srings.Exists(items(Index)) Then
count(strings.IndexOf(items(Index))) = 1 + count(strings.IndexOf(items(Index)))
Else
count(Index) = 1
strings(Index) = items(Index)
End If
Next
End
MostOccuring = strings(count.IndexOf(count.Max()))
End Function
Это моя функция mostocurring

Вот как я это называю
И он возвращает «# ЗНАЧЕНИЕ!». Зачем? Он должен вернуть наиболее встречающуюся строку клеток. Благодаря.