How to Fill Color in Excel Cell Using a Formula (2025 Update)
In this article, we will show you how to fill color in Excel using a formula. Simply follow the steps below.
How to Fill Color in Excel Cell Using the IF Formula
Follow the steps below on how to fill color in Excel using a formula.
1. Open the Conditional Formatting Rules Manager in Excel
Go to the “Home” tab on the Excel ribbon. Click on “Conditional Formatting” in the “Styles” group.
From the dropdown menu, select “Manage Rules.” This action opens the Conditional Formatting Rules Manager window, where you can view and edit existing rules or create new ones.
2. Create a New Rule for Conditional Formatting
In the Conditional Formatting Rules Manager, click “New Rule.” This opens the New Formatting Rule window. Here, you can define a new condition for formatting the cell based on specific criteria.
3. Choose to Use a Formula for Conditional Formatting
In the New Formatting Rule window, select the option “Use a formula to determine which cells to format.” This choice allows you to input a custom formula that will apply the fill color to cells meeting your specified condition.
4. Enter an IF Formula for Conditional Formatting
In the field labeled “Format values where this formula is true,” enter your IF formula. For example, use `=IF(A1>10, TRUE, FALSE)` to fill the cell if the value in cell A1 is greater than 10.
Modify the formula according to your specific needs. This formula tells Excel which cells should be formatted based on the condition you set.
5. Select the Fill Color for the Conditional Formatting
Click the “Format” button, which opens the Format Cells window.
Navigate to the “Fill” tab within this window. Here, you can select the color you want to use to fill the cell. Once you’ve chosen the color, click “OK” to confirm your selection. This sets the fill color that will be applied when the condition is met.
6. Apply the New Conditional Formatting Rule
After setting the fill color, click “OK” in the New Formatting Rule window to save the rule. This action returns you to the Conditional Formatting Rules Manager. Adjust the cell range if necessary.
7. Confirm and Close the Conditional Formatting Rules Manager
Once you have verified that the rule is correct and applies to the desired cell range, click “Apply” to activate the rule. Then, click “OK” to close the Conditional Formatting Rules Manager. Your selected cells will now fill with the chosen color based on the IF formula condition you entered.
We hope you now have a better understanding of how to fill color in Excel using a formula. If you enjoyed this article, you might also like our article on how to create a custom autofill list in Excel or our article on shortcuts to fill color in Excel.