Select the cells, click the arrow next to Home → Fill Color (the paint bucket) and pick a colour. From the keyboard, press Alt → H → H and use the arrow keys. To colour the whole sheet, click the Select All corner above row 1 first.
To colour cells that meet a condition, use Home → Conditional Formatting → Highlight Cells Rules, or New Rule → Use a formula to determine which cells to format with a formula such as =$D2>10000 to colour the whole row. The colour updates when the value changes.
For exact shades, patterns or gradients, open Ctrl + 1 → Fill and click More Colors, where you can enter RGB values. Press F4 to repeat the last fill on another selection.
To remove a fill, choose No Fill, not white. A white fill looks the same but hides the gridlines on those cells.
In VBA, ActiveSheet.Cells.Interior.Color = RGB(242, 242, 242) fills the whole sheet, and Selection.Interior.Color = RGB(255, 235, 156) fills the selected cells.
As you know, white is the default background color in Excel, and most of the time, to highlight a cell or a range of cells, users prefer to apply a background color to the cells.
In Excel, a background color can be applied in several ways, like by using the “Fill Color” option or by applying different types of conditions using the “Conditional Formatting” option and many more.
The background color once applied to the cells or the sheet using the “Fill Color” option will not change when the value of the cells changes. On the other hand, with the “Conditional Formatting” option, the color of the cells changes with the change in cell value based on the conditions applied.
We have mentioned some quick and simple steps for you to apply background color in Excel.
Apply Background Color Using Fill Color Option
- First, select the cell or range of cells or the entire sheet to apply the background color to the cell or range of cells or the entire sheet respectively.
- After that, go to the “Home” tab and then click on the “Fill Color” drop-down arrow and select the color you want to apply.

- Once you select the color, you will get your selected cells or cells range or the entire sheet highlighted with the selected color.
You can also open the Fill Color menu from the keyboard with Alt ➜ H ➜ H, and then pick a color with the arrow keys. To remove the color later, choose “No Fill” from the same menu.
Apply Background Color Using Format Cells
The Format Cells dialog box gives you more options than the Fill Color button. Select the cells, press Ctrl + 1, and go to the Fill tab. Here you can pick a background color, click “More Colors” to enter an exact RGB or hex color, add a pattern with “Pattern Color” and “Pattern Style”, or create a two-color gradient with “Fill Effects”. Click OK to apply it.
Apply Background Color Based on the Cell Values Using Conditional Formatting
Using conditional formatting, users can apply background colors to the cells based on one or multiple conditions at the same time, like value greater than, value less than, values equal to, duplicate values, text in the cell, etc.
And whenever the cell value gets updated, the color of the cell changes automatically according to the conditions specified.
- First, select the entire sheet or a range of cells where you want to apply the background color formatting, and then go to the “Home” tab.
- After that, click on the “Conditional Formatting” drop-down arrow and then click on the “Highlight Cells Rules” and then click on the “More Rules” option.

- Once you click on “More Rules”, you will get the “New Formatting Rule” dialog box opened.

- Now, select the rule type “Format only cells that contain” and select the formatting condition you want to apply, enter the value, and then click on the “Format” button.

- Now, in the “Format Cells” dialog box, select the “Fill” tab, choose the color you want to apply, and then click OK.

- Once you click OK, you will get back to the “New Formatting Rule” dialog box, where you can now see the preview of the selected color.
- In the end, click OK.

- At this point, you will get the cells of your selected range highlighted with the background color based on the condition applied.

In the above example, we have selected the condition of “Greater than or equal to” with a base value of “10000” and the color as green, therefore all the cells having a value of 10000 or more got highlighted with the green background color.
To apply more color formatting conditions on the same range, users need to follow the same steps and just add a second rule alongside the first one that we have created above.
- Again, select the range of cells and go to the “New Formatting Rule” dialog box using the same steps as mentioned above.
- Now, select the new condition again with the value and then click on the “Format” button to select the color and click OK.

- At this point, you will get the new additional background color applied to the cells based on the second condition applied.

You can now see the two different colors based on the two conditions which we had applied.
And in the same way, you can apply more conditions to the same range like highlighting the background color with the cells equal to zero (0), and in that case, you have to apply the new condition “Equal to” with the value entered as zero (0).
Then you will get the cells with the value zero highlighted with the background color that you select while applying the condition.
Apply Background Color to the Special Cells Using Conditional Formatting
Special cells here refer to the cells that are blank or empty with no data or the cells with formula errors.
- First, select the cells range or the entire table or the entire sheet if you want to apply background color to the special cells from a particular range of cells or the entire table or entire sheet respectively.

- After that, go to “Conditional Formatting” and click on “New Rule” to open the “New Formatting Rule” dialog box.
- Now, select the rule type “Format only cells that contain”, click on the first drop-down arrow on the left (“Cell Value”), and select the “Blanks” or “Errors” option to apply background color to the blank cells or the cells with errors.

- Once you have selected “Blanks” or any other type, depending on which cells you want to color, click on the “Format” button and select the color.
- In the end, click OK.

- At this point, you will get the cells of your selected range or table or sheets highlighted with the color based on the condition applied.

Apply Background Color Using Cell Styles
- First, select the cells range, the entire table or the entire sheet where you want to apply the background color.
- After that, go to the “Home” tab, then click on the “Cell Styles” icon, and then select the background color style you want to apply.
- In this example, we have selected the “Neutral” color for the selected table.

- Once you select the color, you will get your selected cells or range or table or sheet applied with that color.
In Excel, there are several ways to apply background color to a cell or the entire sheet, and which one to use depends on your requirement.
If you want the color once applied to not change with any change in the cell value, then you can simply use the “Fill Color”, “Format Cells” or “Cell Styles” option.
But if you want your cell colors to be dynamic, which means the color changes automatically when the cell value changes, based on the conditions applied, you can use the “Conditional Formatting” option.
Color the Entire Row Based on a Cell Value
The “Format only cells that contain” rule colors only the cell with the value. To color the whole row, select the table (like A2:E20), go to Conditional Formatting ➜ New Rule ➜ “Use a formula to determine which cells to format”, and enter a formula like the following one, which colors every row where the value in column C is 10000 or more. The $ before C keeps every cell of the row looking at column C:
=$C2>=10000
Change the Background Color with VBA
If you want to color cells with a macro, use the Interior.Color property of the range. The following code fills A1:C5 with light green and removes the fill from E1:E5:
Sub cell_background_color()
Range("A1:C5").Interior.Color = RGB(198, 239, 206)
Range("E1:E5").Interior.ColorIndex = xlNone
End Sub
Frequently Asked Questions
Why can’t I remove the background color with No Fill?
The color probably comes from conditional formatting or an Excel table style, which No Fill doesn’t change. Remove the rule with Conditional Formatting ➜ Clear Rules, or change the table style.
Can a formula change a cell’s color?
No, a normal formula can’t change formatting. Use conditional formatting with a formula rule instead, as shown above.
Can I filter or sort by background color?
Yes. Turn on the filter (Ctrl + Shift + L), click the drop-down arrow on the column, and use Filter by Color or Sort by Color. It works for both fill colors and conditional formatting colors.
hi sir,
whole sheet backcolor how to change in vba
I need special features of excel that amezed other