|
Home > Format > ConditionalFormatting > Colour Conditional Formatting - Show List and ColorsSelect a colour name from a drop down list in Excel, and a cell fills with the selected colour. There are no macros, just data validation drop downs and conditional formatting rules. |
On a Microsoft Excel data entry sheet, select a number of options from a drop down list. That number of options show up in the data entry area. Then, select a color for each item, from another drop down list, and a cell fills with that color. There are 2 sample files:

Watch this video to see the steps for creating this worksheet, with conditional formatting cell rules, and data validation. In this example, the adjacent cells fills with the selected color. The timeline, and the written steps, are below the video, and you can download both versions of the color fill example, in the download section.
In the workbook, there is an Options sheet, with headings, and this sheet is where the drop downs and formatting will be added.

On the Lists sheet, there are 2 lists -- a list of 8 numbers and a list of three colors.
Note: You can add more colors in your workbook, like green colour, or orange. I kept this list short for the sample file.

To use these lists in data validation drop down lists, create a named range for each list.
To name the numbers list:
To name the colors list:

On the Options sheet, create a drop down list of numbers, so people can select a specific number of Options..
You can use commands on the Excel Ribbon's Home tab to add the formatting, or press Ctrl + 1 keyboard shortcut, to open the Format Cells dialog box.

A drop down list of numbers now appears in the Number of Options
cell. ![]()

Next, format the cell, to make it clear that the cell is for data entry.

Next, set up the 8 cells with drop down lists of colors.

A drop down list of colors now appears in each of the Color cells.![]()

Next, create a list of numbers on the Options sheet
Next, the option numbers will be formatted:
To hide the numbers if nothing is selected for the number of options:
To show the applicable numbers, when a selection in made in cell C2 (number of options):
=B5<=$C$2
In the formula, B5 is a relative reference, so it will adjust for each row in the list of numbers. $C$2 is an absolute reference, because each number cell should compare its value with cell C2-- it should not adjust in each row.

To test the formatting, change the number of options in cell C2.

Next add conditional formatting on the Color column, so the cell will have a blue fill and outline border if it's option number is visible.
To format the Color cells, when a selection in made in cell C2 (number of options):
=B5<=$C$2
In the formula, B5 is a relative reference, so it will adjust for each row in the list of numbers. $C$2 is an absolute reference, because each number cell should compare its value with cell C2-- it should not adjust in each row.

To test the formatting, click the drop down arrow in a cell, and change a color selection in column C. The adjacent cell in column should show the current selection color.![]()

Next, you'll apply conditional formatting in the sample column, to show specific colors, based on the adjacent cell values. You will set up a separate rule for each color - Red, Blue and Yellow.
To format the Sample cells, when red is selected in column C:
=C5="red"
In the formula, C5 is a relative reference (no dollar sign to lock the row or column), so it will adjust for each row in the list of numbers.

To format the Sample cells, when blue is selected in column C:
=C5="blue"
In the formula, C5 is a relative reference, so it will adjust for each row in the list of numbers.
To format the Sample cells, when yellow is selected in column C:
=C5="yellow"
In the formula, C5 is a relative reference, so it will adjust for each row in the list of numbers.
To test the formatting, change a color selection in column C, and
the adjacent cell in column should show the selected color.![]()
Conditional Formatting Introduction
Conditional Formatting Based on another cell
Conditional Formatting Examples
Conditional Formatting Documentation
Conditional Formatting Data Bars
Last updated: January 17, 2025 12:12 PM