
How To Count Colors with an Excel Function | Count Colored Cells
In this Excel video tutorial, I'll show you how to make an Excel function to count colors in Excel. If you have a table, a spreadsheet, where you colored your cells, you can count the colors with this formula that I'm going to show you. So, for example, in an accounts payable spreadsheet, you painted all overdue accounts yellow and now you need to know how many overdue accounts, yellow cells, you have in your table. With this color counting function in Excel, you will be able to do this math. To create this function in Excel, we will use Excel's Visual Basic Application or VBA. Function COUNT_COLOR(RANGE As Range, COLOR As Range) Dim COLORC As Integer Dim COUNTT As Integer COLORC = COLOR.Interior.ColorIndex Set IC = RANGE For Each IC In RANGE If IC.Interior.ColorIndex = COLORC Then COUNTT = COUNTT + 1 End If Next IC COUNT_COLOR = COUNTT End Function #JopaExcel #Dashboard #Excel