Filling a background color in a cell or range of cells is a common task that most of Excel users have to do on a daily basis.
While it’s quite easy to fill color in a cell in Excel (using the inbuilt option in the ribbon), it’s not the fastest way to do it.
And if this is something you have to do multiple times in a day, knowing faster ways to fill color in a cell would make you more efficient and also save time.
And needless to say, you can always use the shortcuts and tricks I cover in this tutorial to impress your boss and colleagues.
This Tutorial Covers
- 1 Regular Way to Fill Color in Cells
- 2 Shortcuts to Fill Color in Cells in Excel
- 3 Using Paint Format to Easily Copy and Fill Colors
Regular Way to Fill Color in Cells
Before I show you some shortcut ways to fill color in Excel, let me quickly show you the regular way of doing it:
- Select the cell or range of cells in which you want to fill the color
- Click the ‘Home’ tab
- In the Font group, click on the ‘Fill Color’ icon
- Click on the color that you want to fill in the selected cell
If you don’t find the color you want to fill in the options that show up in Step 3, you can click on the ‘More Colors’ options.
This will open the colors dialog box where you get more colors as well as the option to specify the hex color code or the RGB code
Fun Fact: There are approximately 16.6 million different colors you can use in Excel
Shortcuts to Fill Color in Cells in Excel
Let’s look at some shortcut ways you can use to fill color in cells in Excel.
Keyboard Shortcut to Fill Color in Cells
Let’s start with a keyboard shortcut that will quickly allow you to open the options that show all the colors that you can fill in a cell (all the selected range of cells).
ALT + H + H
To use this keyboard shortcut, you first need to select the cell or the range of cells in which you want to fill the color and then hit these keys in succession (ALT then H, and then H).
The above keyboard shortcut would open the Fill Color panel that shows you all the colors, where you can use the arrow keys to navigate to the color you want to fill and then hit the Enter key.
While this keyboard shortcut may seem faster than using your mouse to click on the Home tab and then click on the color panel and then select the color, one major drawback of this method is that you cannot select the color you need with this keyboard shortcut. You need to use the arrow keys to navigate to the color you want, which makes this keyboard shortcut slow to use
Pros of this shortcut
- Faster than using the mouse (once you get used to it)
- Allows you to not switch from keyboard to mouse
Cons of this shortcut
- Doesn’t allow selecting a color and you need to navigate using the arrow keys
- Slower than expected
- Hard to remember
Pro Tip: If you want to quickly remove the color from a cell or range of cells, you can use the keyboard shortcut ALT + H + H + N
Adding Fill Color Option to the Quick Access Toolbar (QAT)
You can also add the Fill Color icon in the Quick Access Toolbar so that you always have access to it with a single click.
So, instead of going to the Home tab and then locating the Fill Color icon, you can get the same option with a single click.
Below are the steps to add the fill color icon in the Quick Access Toolbar:
- In the Quick Access Toolbar click on the ‘Customize the Quick Access Toolbar’ icon
- In the options that show up, click on ‘More Commands’
- In the ‘Excel Options’ dialog box that opens up, select the ‘Fill Color’ icon option
- Click on the Add button
- Click OK
The above steps would add the fill color icon in the QAT.
To use this, just click on the ‘Fill Color’ icon in the QAT and it’ll show you the palette of colors that you can choose from.
One big benefit of adding icons in the Quick Access Toolbar is that you can also use these icons with a simple keyboard shortcut:
ALT + Number (which is the position of the icon in the QAT)
In our example, since the Fill Color icon is the second option in the QAT, I can use the keyboard shortcut ALT + 2 (where I need to hold the ALT key and then press the 2 key)
As you can see, this keyboard shortcut is a lot better than the regular keyboard shortcut of the fill color icon ALT + H + H
- You always have access to the Fill Color option with a single click
- The keyboard shortcut for icons in the QAT is usually shorter
- You need to add the Fill color icon in the QAT first (one-time effort)
- If you use the mouse to access it, it only saves you one click (so not significantly better than using the option in the ribbon)
Using F4 to Repeat Fill Color Operation
This is not really a direct keyboard shortcut to fill color in any cell or range of cells, however, if you have already used one of the above options to fill color in a cell or range, you can repeat the same action by using the F4 key.
Here is how you can use the F4 key to fill color in Excel:
- Select a cell in which you want to fill the color
- Use the keyboard shortcut or the Fill Color icon in the ribbon to fill the color in the selected cell
- Now select any other cell or range of cells that you want to fill with the same color
- Hit the F4 key
When you use the F4 key in Step 4, it repeats the same action that has been done just before using it.
In our example, since we first filled a cell with a specific color, and then use the F4 key, it repeated the same action.
You can continue to use the F4 key to fill color in multiple cells/ranges as long as you don’t do anything else.
You can even use this across worksheets and other open workbooks
- Huge timesaver as you can do the action once and repeat it as many times as you want
- Works across other worksheets as well as other open workbooks
- Since it’s dependent on the last action, as soon as you do anything else, you won’t be able to use this keyboard shortcut to fill the color
[Advanced] Creating Your Own Shortcut to Fill Color Using VBA
If there is some specific color that you often need to fill in Excel, you can create your own VBA code and install that as an add-in.
Once you do that, you will be able to use simple keyboard shortcuts (that you yourself assign in the VBA code) to quickly fill color in the selected cells.
Below are the detailed steps to create an add-in using VBA code that will allow you to use shortcuts to fill color in the selected cells:
- Open a new Excel workbook
- Click the Developer tab and then click on the Visual Basic icon. this will open the VBA editor. If you do not see the Developer tab, you can use the keyboard shortcut ALT + F11 (or read this guide on how to get the developer tab in the ribbon)
- In Project Explorer, double-click on the ‘ThisWorkbook’ object. If you don’t see Project Explorer, click on the ‘View’ option in the menu and then click on ‘Project Explorer’
- Copy and paste the below code into the ThisWorkbook code window
Private Sub Workbook_Open() Set AppEvents = Application Application.OnKey "+1", "Fill_Red" Application.OnKey "+2", "Fill_Blue" Application.OnKey "+3", "Fill_Green" End Sub
- Click the Insert option in the menu and click on ‘Module’. This will insert a new module for this workbook
- Copy and paste the below code in the module code window
Sub Fill_Red() Selection.Interior.Color = RGB(255, 0, 0) End Sub Sub Fill_Blue() Selection.Interior.Color = RGB(0, 0, 255) End Sub Sub Fill_Green() Selection.Interior.Color = RGB(0, 255, 0) End Sub
- Close the VB editor
- Click the File tab and then click on Save As
- Click on the Browse option and select the location where you want to save the add-in
- Give the Add-in a name
- In the ‘Save as type’ drop-down, select the Excel add-in (.XLAM) option
- Click on Save
With the above steps, we have our add-in that we can install in any Excel workbook so that the VBA code would be available in all the workbooks on our system.
Below are the steps to add this add-in into an excel workbook:
- Open a new Excel workbook (you can also use any existing workbook that is already open)
- Click the Developer tab
- In the Add-ins group, click on Excel Add-ins
- In the Add-ins dialog box, click the ‘Browse’ button
- Locate and select the add-in that we have already created and saved
- Click Ok
- Click OK in the Add-ins dialog box (make sure the add-in you added is checked)
The above steps have added the add-in we created to the Excel workbook. And going forward, this add-in would be available in all the Excel workbooks that you use on your system (new as well as existing)
Now you can use the below keyboard shortcuts to fill color in selected cells in Excel.
To fill Red color:
Shift + 1
To fill Blue color:
Shift + 2
To fill Green color:
Shift + 3
In this example, I have shown you how to create a couple of keyboard shortcuts that you can use to fill red, blue, or green colors in the selected cells.
You can modify the VBA code to specify your own color and even create more keyboard shortcuts.
Note: You need to keep the add-in file that we created in the same location for the add-in to continue to work. If you delete this file, you won’t be able to use this add-in in any of the Excel files. In case you change the location of the add-in file, you need to install it again.
- Easy to use once set-up
- You can create your own shortcuts and use these in any workbook once the add-in is installed
- The initial setup is long and a bit advanced for beginner Excel users
- Add-ins can sometimes create issues and conflict with existing Excel features or other add-ins
Using Paint Format to Easily Copy and Fill Colors
Excel also allows you to quickly copy the formatting from one cell (or a range of cells) and paste this formatting to other cells.
This can easily be done using the Format Painter tool.
And since the color of the cell is part of the formatting, you can also use this to quickly copy the color of any cell end applied to other cells
Below I have a data set where I have cell color in some of the headers that contain the month name, I need to fill the same color in the other headers that do not have any color in the cell.
Since I want the same color to be filled to the headers in cells D1, E1, and F1, instead of doing it manually, I can copy the color from the existing colored cell, and then apply it to these non-filled cells.
Below are the steps to fill color using Format Painter:
- Select the cell that already has the color that you want to copy
- Click the Home tab
- In the Clipboard group, click on the Format Painter icon
- Select the cell (or range of cells) on which you want to fill the same color
Pro Tip: If you want to continue to use the format painter to fill color in multiple cells, double-click on the format painter icon in Step 3. When you click on the format painter icon once, you can only use it once, but when you double click on it, it remains active unless you hit the Escape key or use some other option
Remember that the format printer option would copy all the formatting of the source cell and apply it to the destination cell. This could include cell color, border, font color font size, as well as conditional formatting.
One way many advanced Excel users use the Format Painter tool is to copy the conditional formatting rules from one area and apply it to some other area in the worksheet.
In this tutorial, I showed you some shortcut methods you can use to fill color in the cells in Excel. You can use a keyboard shortcut or add the Fill color icon in the Quick Access Toolbar to use it.
And if you need some specific colors to be quickly applied to the selected cells, you can also consider using the VBA method that allows you to create your own keyboard shortcuts. You can create an add-in using the VBA code so that these shortcuts are available in all the Excel files on your system.
I hope you found this excel tutorial useful.
Other Excel articles you may also find helpful:
- Excel Paste Special Shortcuts That Will Save You Tons of Time
- How to Select Entire Column (or Row) in Excel – Shortcut
- How to Indent in Excel (3 Easy Ways + Keyboard Shortcut)
- Copy and Paste Multiple Cells in Excel (Adjacent & Non-Adjacent)
- 200+ Excel Keyboard Shortcuts – 10x Your Productivity
- How to Sum by Color in Excel (Formula & VBA)
- How to Sort By Color in Excel (in less than 10 seconds)
- How to Count Colored Cells in Excel – A Step by Step Tutorial + Video
- How to Edit Cells in Excel? (Shortcuts)