Function ColorCountColorCell As Range DataRange As Range Dim Data_Range As Range Dim Cell_Color As Long Cell_Color ColorCellInteriorColorIndex For Each Data_Range In DataRange If Data_RangeInteriorColorIndex Cell_Color Then ColorCount ColorCount 1 End If Next Data_Range End Function. Choose a color in the Order Select On Top in the final drop-down list. The top 2 Methods to Sum by Colors in Excel are as follows Usage of SUBTOTAL formula in excel and filter by color function.
Choose a color in the Order Select On Top in the final drop-down list.
Now select Use a formula to determine which cells to format option and in the box type the formula. Use dollar signs to keep one cells formula the same regardless of where it moves. Function ColorCountColorCell As Range DataRange As Range Dim Data_Range As Range Dim Cell_Color As Long Cell_Color ColorCellInteriorColorIndex For Each Data_Range In DataRange If Data_RangeInteriorColorIndex Cell_Color Then ColorCount ColorCount 1 End If Next Data_Range End Function. 1 Change font color if negativepositive.