DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
[B][COLOR=blue]=RENKLİ_TOPLA(Hücre_Aralığı;Renk_Kodu;Filtre_Kontrol)[/COLOR][/B]
Option Explicit
Function RENKLİ_TOPLA(Aralık As Range, Optional Renk_Kodu As Byte = 6, _
Optional Filtre_Kontrol As Boolean = False)
Dim Hücre As Range, Son_Sütun As Integer, X As Integer
Application.Volatile True
If ActiveSheet.FilterMode And Filtre_Kontrol = False Then
Son_Sütun = ActiveSheet.AutoFilter.Filters.Count
For X = 1 To Son_Sütun
If ActiveSheet.AutoFilter.Filters.Item(X).On Then
Filtre_Kontrol = True
Exit For
End If
Next
End If
If Filtre_Kontrol = True Then
For Each Hücre In Aralık
If Hücre.Interior.ColorIndex = Renk_Kodu Then
If Hücre.Height <> 0 Then
RENKLİ_TOPLA = RENKLİ_TOPLA + Hücre.Value
End If
End If
Next
Else
For Each Hücre In Aralık
If Hücre.Interior.ColorIndex = Renk_Kodu Then
RENKLİ_TOPLA = RENKLİ_TOPLA + Hücre.Value
End If
Next
End If
End Function