Formatting cell colors in excel

Change the format of a cell

You can apply formatting to an entire cell and to the data inside a cell—or a group of cells. One way to think of this is the cells are the frame of a picture and the picture inside the frame is the data. 

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

Formal Cells

  1. Select the cells.

  2. Go to the ribbon to select changes as Bold, Font Color, or Font Size.

Apply Excel Styles 

  1. Select the cells.

  2. Select Home > Cell Style and select a style. 

Modify an Excel Style

  1. Select the cells with the Excel Style.

  2. Right-click the applied style in Home > Cell Styles.

  3. Select Modify > Format to change what you want. 

Need more help?

You can always ask an expert in the Excel Tech Community or get support in the Answers community.

See Also

Format text in cells

Format numbers

Format a date the way you want

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

There are several ways to color format cells in Excel, but not all of them accomplish the same thing. If you want to fill a cell with color based on a condition, you will need to use the Conditional Formatting feature.

Fill a cell with color based on a condition

Before learning to conditionally format cells with color, here is how you can add color to any cell in Excel. 

Cell static format for colors

You can change the color of cells by going into the formatting of the cell and then go into the Fill section and then select the intended color to fill the cell.

In the above example, the color of cell E3 has been changed from No Fill to Blue color, and notice that the value in cell E3 is 6 and if we change the value in this cell from 6 to any other value the cell color will not change and it will always remain blue. What does this mean?

This means that cell color is independent of cell value, so no matter what value will be in E3 the cell color will always be blue. We can refer to this as static formatting of the cell E3.

Conditional formatting cell color based on cell value

Now, what if we want to change the cell color based on cell value? Suppose we want the color of cell E3 to change with the change of the value in it. Say, we want to color code the cell E3 as follows:

  • 0-10 : We want the cell color to be Blue
  • 11-20 : We want the cell color to be Red
  • 21-30 : We want the cell color to be Yellow
  • Any other value or Blank : No color or No Fill.

We can achieve this with the help of Conditional Formatting. On the Home tab, in the Style subgroup, click on Conditional FormattingNew Rule.

Note: Make sure the cell on which you want to apply conditional formatting is selected

Then select “Format only cells that contain,” then in the first drop down select “Cell Value” and in the second drop-down select “between” :

Then, on the first box, enter 0 and in the second box, enter 10, then click on the Format button and go to Fill Tab, select the blue color, click Ok and again click Ok. Now enter a value between 0 and 10 in cell E3 and you will see that cell color changes to blue and if there is any other value or no value then cell color revert to transparent.

Repeat the same process for 11-20 and 21-30 and you’ll see that number changes as per the value of the cell.

Conditional formatting with text

Similarly, we can do the same process for text values as well instead of numerical values by using the “Specific Text” in the first drop down and in the second drop-down select either of 4 values containing, not containing, beginning with, ending with and then enter the specific text in the text box.

For Example:

First, select the cell on which you want to apply conditional format, here we need to select cell B1. On the home tab, in the Styles subgroup, click on Conditional Formatting→New Rule.

Now select Format only cells that contain the option, then in the first drop down select “Specific Text” and in the second drop-down select either of the 4 options: containing, not containing, beginning with, ending with. In the example below, we use beginning with “J” and then select Format button to select Blue as the fill color.

Conditional format based on another cell value

In the example above, we are changing the cell color based on that cell value only, we can also change the cell color based on other cells value as well. Suppose we want to change the color of cell E3 based on the value in D3, to do that we have to use a formula in conditional formatting.

Now suppose if we want to change cell E3 color to blue if the D3 value is greater than 3 and to green if the D3 value is greater than 5 and to red, if D3’s value is greater than 10, we can do that with the conditional format using a formula.

Again follow the same procedure.

First, select the cell on which you want to apply conditional format, here we need to select cell E3. On the home tab, in the Styles subgroup, click on Conditional Formatting→New Rule.

Now select Use a formula to determine which cells to format option, and in the box type the formula: D3>5; then select Format button to select green as the fill color.

Keep in mind that we are changing the format of cell E3 based on cell D3 value, note that the cursor now is pointing at E3, which is the cell we use to set conditional format. The formula “=D3>5” means if D3 is greater than 5 then the value of E3 will change to green. Click ok and see the color of cell E3 changes to green as D3 right now contains 6.

Now let’s apply the conditional formatting to E3 if D3 is greater than 3. This means if D3>3 then cell color should become “Blue” and if D3>5 then cell color should remain green as we did it in the previous step.

Now, if you follow the above steps as we did for Green color, you will see that even if the cell value is 6, it is showing blue color and not green, because it takes the latest conditional formatting we set for that cell, and as 6 is also greater than 3 hence it is showing blue color but it should show green color.

So, we have to arrange the rules we have applied for any particular cells, we can do that by going into Manage Rules option of conditional formatting.

You can see all the rules applied to that cell and then we can arrange the rules or set their priority by using the arrow buttons. A number greater than 5 will also be greater than 3, hence greater than 5 rule will take higher priority and we can move it upward using the arrow buttons.

Now when you enter 6 in D3, the cell color of E3 will become green and when you enter 4, the cell color will become blue.

If you are tired of reading too many articles without finding your answer or need a real Expert to help you save hours of struggle, click on this link to enter your problem and get connected to a qualified Excel expert in a few seconds. You can share your file and an expert will create a solution for you on the spot during a 1:1 live chat session. Each session last less than 1 hour and the first session is free.

Are you still looking for help with Conditional Formatting? View our comprehensive round-up of Conditional Formatting tutorials here.

If you’re wondering how to fill a cell with color in Excel, then it’s probably because you are trying to make your data easier to understand visually. Use these steps to fill a cell with color in Excel.

How Do You Fill a Cell with Color in Excel?

  1. Open your spreadsheet in Excel.
  2. Select the cell or cells to color.
  3. Click the Home tab at the top of the window.
  4. Click the down arrow to the right of the Fill Color button.
  5. Choose the color to use to fill the cell(s.)

Our article continues below with more information on how to color cells in Excel, as well as pictures of the steps outlined above.

Using formulas like concatenate can greatly improve your working experience with Microsoft Excel, but the formatting of your data can be equally important as the formulas that you use within it.

Learning how to fill a cell with color in Excel is beneficial when you need to visually separate certain types of data in a spreadsheet that you might not otherwise be able to distinguish from one another. The cell fill color makes it easy to identify like types of data that might not be physically located near one another in your worksheet.

Excel spreadsheets can become very difficult to read as they expand to include more rows and columns. This is especially true of spreadsheets that are larger than your screen and require you to scroll in a direction that removes the column or row headings from view.

Last update on 2023-04-13 / Affiliate links / Images from Amazon Product Advertising API
| As an Amazon Associate, I earn from qualifying purchases.

One way to combat this problem with reading Excel data on your screen is to fill a cell with color. If you want to learn how to fill a cell with color in Excel, then maybe you have seen other people create multi-colored spreadsheets that consist of a number of different filled cells that run for the entire length of a row or column.

While initially this might seem like an exercise that is simply meant to make a spreadsheet appear more attractive, it actually serves an important function by letting the document viewer know what row a particular piece of data is contained within.

Our guide on how to expand all rows in Excel can provide you with a simple way to increase the height of your rows in order to show all of the data contained within your cells.

Microsoft Excel 2010 includes a specific tool that you can use to fill a selected cell with a certain color. You can even choose the color that you want to use to fill that cell. That tool is accessed by clicking the Home tab at the top of the Excel window, and is circled in the image below.

use the Excel fill color icon to fill a cell, row or column with color

For example, when I am creating a large spreadsheet, I like to use colors that are distinctly different but are not so distracting that the document becomes hard to read.

If the text in your cells is black, then you will want to avoid using darker fill colors. Sticking to colors like yellow, light green, light blue, and orange will make it very easy for someone to recognize the different cells, but they will not have any difficulty reading the data within them.

This is the most important part because the data is still the reason that the spreadsheet exists in the first place.

To add color to the background of your cell, you must first click the cell to select it. Click the drop-down arrow to the right of the Fill color icon, then click the color that you want to apply to the selected cell.

The background color will change to the color that you selected. If you want to know how to change fill color in Excel 2010, simply click the cell with the fill color that you want to change, then click the Fill color drop-down arrow and choose a different color.

how to color cells in Excel

Now that you know how to color cells in Excel you can use this method to sort and organize your data by simply changing the color of the background in your spreadsheet cells.

If you are not able to change the fill color using this method, then there is some other formatting rule applied to your cell that you need to adjust. Read this article to learn about removing conditional formatting from Excel.

How to Fill a Row With Color in Excel or How to Fill a Column With Color in Excel

The process for applying color to a row or column in Excel is nearly the same as how to apply fill color in Excel to a single cell.

Start by clicking the row or column label (either a letter or number) that you want to apply the fill color to. Once clicked, the entire row should be selected. Click the Fill color icon in the ribbon, then click the color that you want to apply to that row or column. Additionally, if you want to learn how to change the fill color in a row or column in Excel, simply select the filled column or row and use the Fill color icon to select a different color.

how to fill a row with color in Excel

By using these methods to apply fill colors to your Excel spreadsheet, you can make it much easier to see which row or column a particular cell is included within. The image below is an example of a spreadsheet that has been completely colored in, which should give you an idea of what you can do with this tool.

how you fill a cell with color in Excel

Organizing data in this fashion is not particularly necessary when you are dealing with such a small amount of data but, for larger spreadsheets, it can make locating specific types of information much simpler.

Note that using fill colors in this manner is best accomplished when you are done editing your data. The cell fill color won’t stick with the data if you start rearranging rows and columns, so you could wind up with a colorful mess.

Fixing it is as easy as simply re-defining your fill colors, but that can be a pretty big waste of time if you have applied fill color to a lot of your data.

One additional benefit to using fill colors in Excel is the ability to then sort based on those colors. Learn how to sort by fill color in Excel 2010 and take advantage of the formatting that you have applied to your cells.

The next section provides additional information on how to color cells in Excel, such as how to use conditional formatting, and how to apply cell color to multiple cells at the same time.

More Information on How to Format Cells with Cell Color in Microsoft Excel Spreadsheets

Note that you can apply cell colors to one cell, multiple cells, or you could even select the entire sheet by clicking on a single cell then pressing the Ctrl + A keyboard shortcut.

There are some other ways that you can create colored cells in Excel.

For example, if you select all the cells that you want to color, even if there are multiple cells, then you can right-click on those cells and choose the Format Cells option. This opens the Format Cells dialog box.

right click and choose Format Cells

Here you will find a Fill tab at the top of the window that you can use to change the cell background color. You can even click the More Colors button here if you would like to use a color code to modify the color of the cell.

how to color cells in Excel from the Format Cells menu

One other option that you can consider to highlight data with cell colors is to apply conditional formatting. This lets you choose a conditional format based on the cell value so that Excel will format only cells that fit those criteria.

For example, you could choose to format cell values over zero with a green color and make a red cell if it contains a value below zero, or you could apply background colors based on the selected cells containing certain words.

You can find the Conditional Formatting option on the Home tab in the Styles section of the ribbon. Simply click the Conditional Formatting button, choose the parameters, and select format options based on how you want excel to color in your cells.

how to color cells in Excel with conditional formatting

The rules applied during the process of setting up the conditional formatting parameters will apply the cell color based on the options you select.

If none of the color code based options that you see on this dropdown menu offer the solution that you are looking for, then you could click the New rule button and choose your own format.

If you are using Google Sheets and want to be able to color cells, then you are also able to do that. Simply open the spreadsheet in Google Sheets, select the cells that you wish to color, then click the Fill Color button in the toolbar above the spreadsheet. You could also click the Format button at the top of the window and use Conditional formatting or alternating colors there for some more advanced methods of coloring spreadsheet cells.

Additional Sources

Matthew Burleigh has been writing tech tutorials since 2008. His writing has appeared on dozens of different websites and been read over 50 million times.

After receiving his Bachelor’s and Master’s degrees in Computer Science he spent several years working in IT management for small businesses. However, he now works full time writing content online and creating websites.

His main writing topics include iPhones, Microsoft Office, Google Apps, Android, and Photoshop, but he has also written about many other tech topics as well.

Read his full bio here.

Let’s say that one of our tasks is to entering of the information about: did the ordering to a customer in the current month. Then on the basis of the information you need to select the cell in color according to the condition: which from customers have not made any orders for the past 3 months. For these customers you will need to re-send the offer.

Of course it’s the task for Excel. The program should automatically find such counterparties and, accordingly, to color ones. For these conditions we will use to the conditional formatting.



The filling cells with dates automatically

At first, you need to prepare to the structure for filling the register. First of all, let’s consider to the ready example of the automated register, which is depicted in the picture below. Today date 07.07.2018:

Today.

The user to need only to specify, if the customer have made an order in the current month, in the corresponding cell you should enter the text value of «order». The main condition for the allocation: if for 3 months the contractor did not make any order, his number is automatically highlighted in red.

Presented this decision should automate some work processes and to simplify to the visual data analysis.

The automatic filling of the cells with the relevant dates

At first, for the register with numbers of customers we will create to the column headers with green and up to date for months that will automatically display to the periods of time. To do this, in the cell B1 you need to enter the following formula:

DATE.

How does the formula work for automatically generating of the outgoing months?

In the picture, the formula returns the period of time passing since the date of writing this article: 17.09.2017. In the first argument in the function DATE is the nested formula that always returns the current year to today’s date thanks to the functions: YEAR and TODAY. In the second argument is the month number (-1). The negative number means that we are interested in what it was a month last time. The example of the conditions for the second argument with the value:

  • 1 means the first month (January) in the year that is specified in the first argument;
  • 0 – it is 1 month ago;
  • -1 – there is 2 months ago from the beginning of the current year (i.e. 01.10.2016).

The last argument-is the day number of the month, which is specified in the second argument. As a result, the DATE function collects all parameters into a single value and the formula returns to the corresponding date.

Next, go to the cell C1 and type the following formula:

MONTH.

As you can see now the DATE function uses the value from the cell B1 and increases to the month number by 1 in relation to the previous cell. As the result is the 1 – the number of the following month.

Now you need to copy this formula from the cell C1 in the rest of the column headings in the range D1:AY1.

To highlight to the cell range B1:AY1 and select to the tool: «HOME»-«Cells»-«Format Cells» or just to press CTRL+1. In the dialog box that appears, in the tab «Number» in the section «Category» you need to select the option «Custom». In the «Type:» to enter the value: MMM. YY (required the letters in upper register). Because of this, we will get to the cropped display of the date values in the headers of the register, what simplifies to the visual analysis and make it more comfortable due to better readability.

Format Cells.

Please note! At the onset of the month of January (D1), the formula automatically changes in the date to the year in the next one.



How to select the column by color in Excel under the terms

Now you need to highlight to the cell by color which respect of the current month. Because of this, we can easily find the column in which you need to enter the actual data for this month. To do this:

  1. To select the range of the cells B2:AY15 and select the tool: «HOME» -«Styles» -«Conditional Formatting»-«New Rule». And in the appeared window «New Formatting Rule» you need to select the option: «Use a formula to determine which cells to format»
  2. Conditional Formatting.

  3. In the input field to enter the formula:
  4. input field.

  5. Click «Format» and indicate on the tab «Fill» in what color (for example green) will be the selected cells of the current month. Then on all Windows for confirmation to click «OK».

Format.

The column under the appropriate heading of the register is automatically highlighted in green accordingly to our terms and conditions:

register is automatically.

How does the formula highlight of the column color on a condition work?

Due to the fact that before the creation of the conditional formatting rule we have covered all the table data for inputting data of register, the formatting will be active for each cell in the range B2:AY15. The mixed reference in the formula B$1 (absolute address only for rows, but for columns it is relative) determines that the formula will always to refer to the first row of each column.

Automatic highlighting of the column in the condition of the current month

The main condition for the fill by color of the cells: if the range B1:AY1 is the same date that the first day of the current month, then the cells in a column change its colors by specified in conditional formatting.

Please note! In this formula, for the last argument of the function DATE is shown 1, in the same way as for formulas in determining the dates for the column headings of the register.

In our case, is the green filling of the cells. If we open our register in next month, that it has the corresponding column is highlighted in green regardless of the current day.

The table is formatted, now we are filling it with the text value of the «order» in a mixed order of clients for current and past months.

How to highlight the cells in red color according to the condition

Now we need to highlight in red to the cells with the numbers of clients who for 3 months have not made any order. To do this:

  1. Select the range of the cells A2:A15 (that is, the list of the customer numbers) and select to the tool: «HOME»-«Styles»-«Conditional formatting»-«Create rule». And in the window that appeared «Create a formatting rule» to select the option: «Use the formula for determining which cells to format».
  2. This time in the input box to enter the formula:
  3. COUNTIF.

  4. To click «Format» and specify the red color on the tab «Fill». Then on all Windows click «OK».
  5. Fill the cells with the text value of «order» as in the picture and look at the result:

result.

The numbers of customers are highlighted in red, if in the row has no have the value «order» in the last three cells for the current month (inclusively).

The analysis of the formula for the highlighting of cells according to the condition

Firstly, we will do by the middle part of our formula. The SHIFT function returns a range reference shifted relative to the basic range of the certain number of rows and columns. The returned reference can be a single cell or a range of cells. Optionally, you can define to the number of returned rows and columns. In our example, the function returns the reference to the cell range for the last 3 months.

The important part for our terms of highlighting in color – is belong to the first argument of the SHIFT function. It determines from which month to start the offset. In this example, there is the cell D2, that is, the beginning of the year – January. Of course for the rest of the cells in the column the row number for the base of the cell will correspond to the line number in what it is located. The following 2 arguments of the SHIFT function to determine how many rows and columns should be done offset. Since the calculations for each customer will carry in the same line, the offset value for the rows we specified is -0.

At the same time for the calculating the value of the third argument (the offset by the columns) we use to the nested formula MONTH(TODAY()), which in accordance with the terms returns to the number of the current month in the current year. From the calculated formula of the month as a number subtract the number 4, that is, in cases November we get the offset by 8 columns. And, for example, for June – there are on 2 columns only.

The last two arguments for the SHIFT function, determine the height (in the number of rows) and width (in the number of columns) of the returned range. In our example, there is the area of the cell with height on 1 row and with width on 4 columns. This range covers to the columns of 3 previous months and the current month.

The first function in the COUNTIF formula checks the condition: how many times in the returned range using the SHIFT function, we can found to the text value «order». If the function returns the value of 0, it means from the client with this number for 3 months there was not any order. And in accordance with our terms and conditions, the cell with number of this client is shown in red fill color.

If we want to register to data for customers, Excel is ideally suited for this purpose. You can easily record in the appropriate categories to the number of ordered goods, as well as the date of implementation of transaction. The problem gradually starts with arising of the data growth.

Download example automatic highlight cells by color.

If so many of them that we need to spend a few minutes looking for a specific position of the register and analysis of the information entered. In this case, it is necessary to add in the table to the register of mechanisms to automate some workflows of the user. And so we did.

Color in Excel

Color in Excel (Table of Contents)

  • Introduction to Color in Excel
  • Ways to Change Background Color

Introduction to Color in Excel

Colors are generally used to highlight a group of cells in Excel. The excel contains the index of 56 colors. By using conditional formatting, we can put some conditions and apply different colors for different conditions if we want to change the background color of the cell in Excel. We usually select the cells and click the Fill color option; then, the background color will get changed if we want to change the cell’s background colour with the cell automatically.

Ways to Change Background Color

There are two ways to change the background color.

You can download this Color Excel Template here – Color Excel Template

1. Change the color of the cell based on the current value

  • Here the background color of the cell changes when the cell value in the Excel changes.
  • For example, we have taken the following dataset. we want the USD Amount greater than 10,000 as blue color and remaining red color.

Color in Excel 1-1

  • Select the range of the cells which we want to change. Then go to the Home tab, go to the styles and select the conditional formatting.

Color in Excel 1-2

  • Now click on the new rules.
  • A dialog appears stating the selection of the row. Select the format of the cells based on the cell value.

Color in Excel 1-3

  • Now give the range of values which are greater than 10,000 and select the color as blue color.

Color in Excel 1-4

Color in Excel 1-5

  • Now click on the format option.

Color in Excel 1-5

  • A color box appears and makes the Pattern Color as Automatic, so Select color as blue and click on OK.

format cells -fill

  • We can observe that the sample option is blue because we have selected the blue color.

format cells 1

  • We can observe the selected color in the format option. And click the Ok option.

format cells 2

  • Now we can use the same procedure for selecting the color for less value. A dialog appears stating the selection of the row. Select the format of the cells based on the cell value. A dialog appears stating the selection of the row. Select the format of the cells based on the cell value. Now give the range of values which are less than 10,000 and select the color as red color.

format cells 3

  • The color box appears and makes the pattern as automatic and Select color like blue and click OK.
  • The output will be as follows.

format cells 4

2. Change the background color of special cells

  • This is another way of color the background of the particular cell. First, go to the home tab, then select the conditional formatting.

conditional formatting

  • Select the new rules.

Color in Excel 1-2

  • The formatting dialog box appears to click on the cells which need to format, which is at the end of the dialog box.

Use a formula

  • Click on the arrow option at the right end.
  • Write the new formatting rule using the keyword Is Blank condition. This Is Blank is used to highlighting the background cells which are empty.

IsBlank 1

  • Click on the Format option. And select the blue color.

format cells -blue

  • Click on the Ok button.

new formatting rule

  • The output will be as follows.

USD Amount

 3. Sort the Excel by it Color

  • Sorting is one of the methods to select a particular color. First, select the cells, right-click on them, select the sort option, and then select the highest value by color.

Color in Excel 1-6

  • Click the ok button.
  • And Filter the color by its color.

sort

Add level

  • And the output will be as follows.

Change the cell color based on the current value.

  • First, go to the home tab, select the Find and select option, and select the Find option.

find 1

  • Select the value which we want to select. Click on the Find all option.

find and Replace

  • Click on the values range which we want the cells we want to highlight.
  • Click on the Select by value option. And select the Greater in the list.
  • Click on the range of the cells we want to highlight. Click on the select option.
  • Now select the color as blue for the greater value.
  • And the output will be as follows.

 Conditional Formatting in Excel

  • Conditional formatting is generally used to color data bars and icons in the cells.
  • To do the conditional formatting in Excel, first, we take the required data set.
  • Then go to the Home tab and select the conditional formatting option ad put the desired rule which we want to specify, and mention the color which we want to give to the cells of the particular condition.
  • Then a dialog box appears on the screen then simply gives the values we want a particular condition so that the color will be applied successfully.
  • Now select the formatting styles from the drop-down. Here we select the color for the condition. Then click the OK. The conditional formatting will be applied to all the cells at a time. This is one way of adding colors to the cells.

Things to Remember About Color in Excel

  • The colors in excel play a major role in highlighting a particular range of cells.
  • Here we generally use the two approaches like make the background color cells based on the value, and another way is to change the background of special cells.
  • The excel contains the index of 56 colors. By using conditional formatting, we can put some conditions and apply different colors for different conditions.
  • We can also sort the colors based on the colors.
  • We can highlight the empty cells with the colors.
  • Through cells, we can highlight the greater values and the lower value with different colors.

Recommended Articles

This has been a guide to Color in Excel. Here we discuss How to use Color in Excel along with practical examples and a downloadable excel template. You can also go through our other suggested articles –

  1. Alternate Row Color Excel
  2. Excel Sum by Color
  3. Count Colored Cells In Excel
  4. Excel Sort by color

Понравилась статья? Поделить с друзьями:
  • Formatting a workbook in excel
  • Format html for excel
  • Format header in excel
  • Formatting a spreadsheet in excel
  • Format from word to html