tahsinanarat
Altın Üye
- Katılım
- 14 Mart 2005
- Mesajlar
- 2,181
- Excel Vers. ve Dili
- Ofis 2019 Türkçe
Konu ile ilgili evren hocamın evvelce sunduğu kodları deneyiniz
'EN ÇOK OLAN (SUTUNDA)
'kodları yazan : Evren Gizlen
'EN ÇOK OLAN (SUTUNDA)
'kodları yazan : Evren Gizlen
Kod:
Function EN_COK_OLAN(alan As Range)
Dim z As Object, hcr As Range
Dim cok As Long, isim As String
'*******************************************************
Set z = CreateObject("Scripting.Dictionary")
For Each hcr In alan
If hcr.EntireRow.Hidden = False Then
If Not z.exists(hcr.Value) Then
z.Add hcr.Value, 1
If cok < 1 Then
cok = 1
isim = hcr.Value
End If
Else
z.Item(hcr.Value) = z.Item(hcr.Value) + 1
If z.Item(hcr.Value) > cok Then
cok = z.Item(hcr.Value)
isim = hcr.Value
End If
End If
End If
Next
'*******************************************************
Set z = Nothing
EN_COK_OLAN = isim
End Function
'bu fonksiyon süzülen listedede çalışır
