Kira tidak. Sel dengan warna tertentu dalam baris / Lajur

Di sini saya menentukan fungsi untuk mengira tidak. sel dalam Row / Column dengan warna tertentu,

Sama seperti Countif cellcolor = Warna

 Fungsi ColorCount (colorCell As Range, countRange As Range) Dim rCell As Range Dim cellCol As Integer Dim ans As Long ans = 0 cellCol = colorCell.Interior.ColorIndex For Each rCell In countRange If rCell.Interior.ColorIndex = cellCol Then ans = ans + 1 Tamat Jika Seterusnya rCell ColorCount = ans End Function 
Artikel Sebelumnya Artikel Seterusnya

Tip-Tip Utama