DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Function RENK(alan As Range, kriter As String, olcut As Range)
Application.Volatile
For a = 1 To alan.Rows.Count
If alan.Cells(a, 1) = kriter And alan.Cells(a, 2).Interior.Color = olcut.Interior.Color Then RENK = RENK + alan.Cells(a, 2)
Next
End Function
=RENK(A2:B12;D2;E2)=RenkTopla(A2:B12;D2;B12)
Function RenkTopla(Rng As Range, Deger As String, OrnekHucre As Range)
Dim Hcr As Range, _
Tpl As Double
If Rng.Columns.Count > 2 Then
RenkTopla = "Kolon Sayısı Fazla"
Exit Function
End If
For Each Hcr In Rng
If Hcr.Column = 1 And Hcr = Deger Then
If Hcr.Offset(0, 1).Interior.ColorIndex = OrnekHucre.Interior.ColorIndex Then
Tpl = Tpl + Hcr.Offset(0, 1)
End If
End If
Next Hcr
RenkTopla = Tpl
End Function