How to insert color coded drop-down list in Word table?
Suppose you have a table in your Word document, and now you want to insert a color-coded drop-down list in a column of the table. This means when you select one option from the drop-down, the cell color becomes red, and when you select another, the cell color becomes green, as shown in the screenshot below:

Insert color coded drop-down list in Word document with VBA code
The following steps will guide you through inserting a drop-down list in a table cell and applying background color to the cell based on the selected item:
- Select a cell in the table where you want to insert the drop-down, and then click "Developer" > "Drop-Down List Content Control".
Note: If you donβt see the Developer tab in the ribbon, visit: How to show the Developer tab in Word ribbon.
- The drop-down is inserted into the specific cell. Then click "Developer" > "Properties".
- In the "Content Control Properties" dialog box, do the following:
- Enter the title name in the "Title" text box.
- Click the "Add" button to open the "Add Choice" dialog.
- Type the drop-down list item in the "Display Name" text box.
- Repeat Step 3 to insert other drop-down list items as needed.
- After creating the first drop-down list, you can copy and paste it into other cells.
- Hold down ALT + F11 to open the "Microsoft Visual Basic for Applications" window.
- In the Microsoft Visual Basic for Applications window, double-click "ThisDocument" from the "Project" pane to open the module. Then copy and paste the following code into the blank module:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) With ContentControl.Range If ContentControl.Title = "Status" Then Select Case .Text Case "Complete" .Cells(1).Shading.BackgroundPatternColor = wdColorRed Case "In Progress" .Cells(1).Shading.BackgroundPatternColor = wdColorGreen Case "Not Start" .Cells(1).Shading.BackgroundPatternColor = wdColorBlue Case Else .Cells(1).Shading.BackgroundPatternColor = wdColorAutomatic End Select End If End With End Sub
Note: In the code above, "Status" is the title name used when creating the drop-down list, and "Complete", "In Progress", and "Not Start" are the items. You can change these values and the corresponding colors as needed.
- Save and close the code window. Now, when you select an item from the drop-down list, the corresponding color will fill the cell.

Best Office Productivity Tools
Kutools for Word - Elevate Your Word Experience with Over 100 Remarkable Features!
π€ Kutools AI Features: AI Assistant / Real-Time Assistant / Super Polish (Preserve Format) / Super Translate (Preserve Format) / AI Redaction / AI Proofread...
π Document Mastery: Split Pages / Merge Documents / Export Selection in Various Formats (PDF/TXT/DOC/HTML...) / Batch Convert to PDF...
β Contents Editing: Batch Find and Replace across Multiple Files / Resize All Pictures / Transpose Table Rows and Columns / Convert Table to Text...
π§Ή Effortless Clean: Sweap away Extra Spaces / Section Breaks / Text Boxes / Hyperlinks / For more removing tools, head to the Remove group...
β Creative Inserts: Insert Thousand Separators / Check Boxes / Radio Buttons / QR Code / Barcode / Multiple Pictures / Discover more in the Insert group...
π Precision Selections: Pinpoint Specific Pages / Tables / Shapes / Heading Paragraphs / Enhance navigation with more Select features...
β Star Enhancements: Navigate to Any Location / Auto-Insert Repetitive Text / Toggle Between Document Windows / 11 Conversion Tools...
π Supports 40+ Languages: Use Kutools in your preferred language β supports English, Spanish, German, French, Chinese, and 40+ others!

β¨ Kutools for Office β One Installation, Five Powerful Tools!
Includes Office Tab Pro Β· Kutools for Excel Β· Kutools for Outlook Β· Kutools for Word Β· Kutools for PowerPoint
π¦ Get all 5 tools in one suite | π Seamless integration with Microsoft Office | β‘ Save time and boost productivity instantly
Best Office Productivity Tools
Kutools for Word - 100+ Tools for Word
- π€ Kutools AI Features: AI Assistant / Real-Time Assistant / Super Polish / Super Translate / AI Redaction / AI Proofread
- π Document Mastery: Split Pages / Merge Documents / Batch Convert to PDF
- β Contents Editing: Batch Find and Replace / Resize All Pictures
- π§Ή Effortless Clean: Remove Extra Spaces / Remove Section Breaks
- β Creative Inserts: Insert Thousand Separators / Insert Check Boxes / Create QR Codes
- π Supports 40+ Languages: Kutools speaks your language β 40+ languages supported!