20220407 1227 

 

REF

[1] "https://www.howtoexcel.org/count-colored-cells/"

 

code

Function zColorCellCount(zTarget, zRefCell_with_color)

zcol = zRefCell_with_color.Interior.ColorIndex
zcounter = 0
For Each c In zTarget
  If c.Interior.ColorIndex = zcol Then
      zcounter = zcounter + 1
  End If
Next c
zColorCellCount = zcounter

End Function

'[PA] 업무자동화 > [XL]Excel & VBA' 카테고리의 다른 글

XL draw a line between two cells  (0) 2022.05.10
XL VBA kitchen utils  (0) 2022.05.10
XL VBA Filter Auto, Advanced  (0) 2022.03.04
XL VBA Array  (0) 2022.02.26
XL 모두 새로 고침  (0) 2021.12.14
Posted by Weneedu
,


출처: https://privatedevelopnote.tistory.com/81 [개인노트]