DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Option Explicit
Sub renkli_say()
Dim STR As Long, HCR As Range, SYM As Long
Dim SBT As Variant
Application.ScreenUpdating = False
For STR = 12 To Cells(Rows.Count, "B").End(xlUp).Row
SYM = 0
If Cells(STR, "B") <> Empty And Cells(STR, "B") = "TOPLAM" Then
Set HCR = Range("B5:CF11").Find(Cells(STR, "B"), , , xlWhole)
If Not HCR Is Nothing Then
SBT = HCR.Address
Do
If Range(HCR.Address).Interior.Color = vbGreen Then
SYM = SYM + 1
End If
Set HCR = Range("B5:CF11").FindNext(HCR)
Loop While Not HCR Is Nothing And HCR.Address <> SBT
End If
Cells(STR, "D") = SYM
End If
Next
Application.ScreenUpdating = True
MsgBox "İşlem Tamamlandı", vbInformation
End Sub
Function RSAY(Alan As Range, Renk As Byte, Kriter As Variant)
Dim Veri As Range
Application.Volatile True
For Each Veri In Alan
If Veri.Interior.ColorIndex = Renk Then
If Veri.Value = Kriter Then
RSAY = RSAY + 1
End If
End If
Next
End Function
=RSAY(Hücre_Aralığı;Renk_Kodu;Sayılacak_Kriter)