Change Row Colors in Google Sheets by Dropdown
In this article
Yes, you can automatically change a row’s background color in Google Sheets based on a dropdown selection. This is done with conditional formatting using a custom formula that references the dropdown cell. Once set up, the row will instantly change color whenever you pick a different option from the dropdown — no manual formatting needed. You’ll need a Google account and a sheet with a dropdown already created (or you can create one as part of the steps).
What You'll Need
- A Google Sheets file with data in rows.
- A cell (or column) in each row that contains a dropdown list (Data > Data validation). If you don’t have one yet, you’ll create it in Step 2.
- Basic familiarity with selecting ranges in Sheets.
Step-by-Step
- Open your Google Sheet and make sure your data is organized in rows. For example, column A might be a task name, column B a due date, and column C a status dropdown.
- Create the dropdown (if not already done): Select the cell or range where you want the dropdown (e.g., C2:C100). Go to Data > Data validation. Under “Criteria,” choose “List from a range” and select the range containing your options (e.g., a list on another sheet), or choose “List of items” and type the options separated by commas (e.g., Done, In Progress, Not Started). Click Save.
- Select the entire data range that you want to color. For instance, if your data is in A2:C100, click on A2, hold Shift, and click C100. Do not include the header row if you don’t want it colored.
- Open conditional formatting: With the range selected, go to Format > Conditional formatting. This opens a panel on the right.
- Set up a rule: Under “Apply to range,” confirm it shows your selected range (e.g., A2:C100). Under “Format rules,” change the dropdown from “Format cells if…” to Custom formula is.
- Enter the formula: In the formula box, type a formula that references the dropdown cell in the first row of your selected range. For example, if your dropdown is in column C and your range starts at row 2, type:
=$C2="Done"
The dollar sign locks the column, so the formula applies to each row in the range. - Choose the fill color: Click the paint roller icon (fill color) and pick a color, e.g., green for “Done.” You can also set text color or bold if you want.
- Click Done to apply the rule. Your rows will now highlight when the dropdown in that row matches the value.
- Add more rules for other dropdown options: Click Add another rule in the conditional formatting panel. Repeat steps 5–8 with a different formula (e.g.,
=$C2="In Progress") and a different color (e.g., yellow). - Test it: Change a dropdown value in a row and watch the row color update instantly.
Common Mistakes
- Forgetting the dollar sign: If you write
=C2="Done"without the$, the rule may apply incorrectly across columns. Always use$C2(column locked, row relative). - Applying the rule to the wrong range: If your “Apply to range” is only A2:A10, the formula will only color column A. Make sure the range covers all columns you want colored.
- Mismatched dropdown values: The formula must exactly match the dropdown item text, including spaces and capitalization. “Done” and “done” are different.
- Header row colored accidentally: If you include row 1 in the range, the header will also be colored when the formula matches. Start your range at row 2.
- Using “Text is exactly” instead of custom formula: The default “Text is exactly” only colors the cell itself, not the whole row. You must choose “Custom formula is.”
Tips
- Use named ranges for your dropdown options if you have many items — it makes the data validation easier to manage.
- Combine multiple conditions with AND or OR in the formula. For example, to color only if status is “Done” and priority is “High,” use
=AND($C2="Done",$D2="High"). - Prioritize rules: If you have overlapping rules, the rule higher in the list takes precedence. Drag rules in the panel to reorder.
- Use a theme: Choose colors that are easy to read with your font color. Dark text on light pastel backgrounds usually works best.
- Copy formatting to new rows: When you add new rows, the conditional formatting automatically applies if the new row is within the “Apply to range.” Extend the range manually if needed.
Troubleshooting
If the row doesn’t change color:
- Check the dropdown value in the cell — is it exactly the same as in the formula? Remove extra spaces.
- Verify the formula references the correct column. If your dropdown is in column D, use
$D2, not$C2. - Make sure the “Apply to range” includes the row you’re testing. If you only applied to A2:C10, row 11 won’t color.
- Confirm the rule is enabled — there’s a toggle switch on the right side of each rule in the panel.
- If you have multiple rules, check the order — a higher rule might override a lower one.
If the whole column colors instead of just the row: This usually means you used $C$2 (absolute both row and column) instead of $C2. Change the formula to lock only the column.
If the dropdown itself doesn’t work: Re-check Data validation — make sure the range is correct and the dropdown appears when you click the cell.
Frequently Asked Questions
Can I use this method to color the entire row based on a checkbox?
Yes, but the formula is different. If the checkbox is in column A, use =$A2=TRUE to color the row when checked.
Does conditional formatting work with dropdowns created from a different sheet?
Yes, as long as the dropdown list is defined (either from a range or list of items). The conditional formatting formula only checks the value in the cell, not where the list came from.
Can I apply this to multiple non-adjacent rows?
Yes, you can set “Apply to range” to a non-contiguous range like A2:C10, A15:C20, but the formula must reference the first row of each block correctly. It’s easier to apply to one continuous range and then add a second rule for the other block.
Will the row color update automatically when I change the dropdown?
Yes, it updates instantly. Conditional formatting recalculates whenever the cell value changes.
Can I use text from the dropdown to color the row with a formula like “contains”?
Yes, use =REGEXMATCH($C2, "Done|Complete") to match multiple values, or =SEARCH("Done",$C2) for partial matches. Note that SEARCH is case-insensitive.
How do I remove the formatting later?
Go to Format > Conditional formatting, hover over the rule you want to delete, click the trash can icon, then Done.