Forum Discussion
geethdhoni
Jul 02, 2025Copper Contributor
Colormatch function in excel (using VBA code)
I am preparing a scoreboard for different projects. 10 KPIs of different weightage to measure each project performance. Each KPI will have either 3 responses (good, bad, ugly). User will update the r...
JKPieterse
Jul 08, 2025Silver Contributor
Colormatch is not a built-in function, please show us the source code.
geethdhoni
Jul 24, 2025Copper Contributor
Function COLORMATCH(cell1 As Range, cell2 As Range) As Boolean
Dim color1 As Long
Dim color2 As Long
color1 = cell1.Interior.color
color2 = cell2.Interior.color
COLORMATCH = (color1 = color2)
End Function
- m_tarlerJul 24, 2025Bronze Contributor
I suspect the colors you used are not the same. you could use the same drop downs and same conditional formatting rule(s) in row 1 to "produce" those colors
Better yet, get rid of the VBA/macro and just check the VALUE in the cell. IF(F7="On time", D7, ....