엑셀 VBA - 색깔별 갯수 세기(color count 기능)
1. 엑셀에서 [개발도구]-[Visual Basic]을 연다. (단축키 ALT+F11) * [파일]-[옵션]에서 [리본사용자지정]-[개발자 도구]를 클릭한다. 2. 활성화된 Visual Basic 창에서 [삽입]-[모듈]을 클릭한다. 3. 아래 코드를 추가한다. Function ColorCount(inRng As Range, inColor As Range) Dim rngCell As Range Dim allCount As Long For Each rngCell In inRng If rngCell.Interior.Color = inColor.Interior.Color Then allCount = allCount + 1 End If Next ColorCount = allCount End Function 5...
STUDY
2020. 3. 16. 15:17