COUNTIF Formula: In a separate cell where you want the count result, enter the formula: =COUNTIF(range, criteria). Replace "range" with the actual range of your data (e.g., A1:A10) and "criteria" with either the formula referring to the color code you want to count or the defined name for your color code range