In this article, you will find two quick ways to change the background color of cells based on value in Excel 2016, 2013, and 2010. Also, you will learn how to use Excel formulas to change the color of blank cells or cells with formula errors. Continue reading
by
Comments page 2. Total comments: 73
I need my cells to change color when a specific date arrives. Like 90 days before an expiration it changes to yellow and then 30 days prior it changes to red. Please help!
Hi Kristy,
You can create the following rules:
Yellow: =AND($A1-TODAY()>30, $A1-TODAY()<90)
Red: =AND($A1-TODAY()>=0, $A1-TODAY()<=30)
For more info, please see How to conditionally format dates and time in Excel.
Svetlana
I can't figure out how to make a cell color change when A1 is 10% greater that A2. I would like A2 to change its color
Hi Greg,
You can create a rule with the percent change formula:
=($A$1-$A$2)/$A$2>10%
Hi Svetlana,
Thanks for all this info.
I would like to change the colour of an entire row not just a cell, based on contents of a cell in that row. ie if the specified cell contains a specific word, the entire rows fill can be changed.
Thanks
Walter
Hi Walter,
To highlight entire rows, you simply apply the same rule to several columns instead of one. You can find the full details in the following article:
https://www.ablebits.com/office-addins-blog/excel-change-row-color-based-on-value/
Hi Svetlana,
This is very useful
I have one question,How to change the entire column color based on one cell value? eg if i have a text sunday in a cell, the entire column should be displayed in different color
Hi Hari,
You can select all the columns you want to highlight and create a rule with the following formula:
=countif(A:A,"Sunday")>0
Where A is the left-most column.
Hi Svetlana,
IS this possible also to put some error message in the cell or in some other cell based upon conditional formatting. let say If cell of column A in a row has value less than 10 then cell of Column B will be highlighted as well as we need to put message that "column A is < 10" either in the same B cell or in different column cell in the same row?
Hi Swapnik,
You can display a message by entering an IF formula in cell B1 and then copying it down to other cells:
=IF(A1<10, "column A is < 10", "")
Typo in the above:
I need to know "IF" a maximum of 3 has been....
Hi Kristen,
Assuming that the values you want to highlight are in column A and row 2 is your 1st row with data (not including column headers), you can use the following formulas:
Highlight the 2nd occurrence: =COUNTIF($A$2:$A2,$A2)=2
Highlight the 3rd and all subsequent occurrences: =COUNTIF($A$2:$A2,$A2)>=3
Dear Svetlana,
Congratulate for your blog, I am fully impressed.
I tried to find an answer and maybe you already had this question - if yes, sorry.
My question is: I have an excel sheet where costumers populate entries time by time based on general rules, so the entry is fixed. I have a mapping table about 20 countries. I would like to colour only these countries on my main sheet with conditional formatting or a rule-set but without an additional column where I use vlookup. I can set up 20 different rules with conditional formatting, but maybe you have a more professional idea as well.
Many thanks for your kind help in advance, Kate
Hi Kate,
This task is far from trivial :)
You can try creating a rule with the following formula:
=NOT(ISERROR(MATCH(A2,Sheet2!$A$2:$A$20,0)))
Where A2 is the first cell with data in your main table and A2:A20 is the list of countries in the mapping table.
Dear Svetlana,
You are a genius, it works!!! Thank you very much!
Kate
Hi,
I am creating a spreadsheet and would like to have three collums with dates that change the color of each row.
colloum A - turns X color when a date is entered.
COlloum B - Turns X color when a date is entered.
Colloum C - Turns X color when a date is entered.
I would like a check mark to apear in a fourth colloum when the row has three dates entered, and a X when one or two dates are entered.
Thank you.
Hi Aaron,
You can create a rule for each column in this way: Conditional Formatting > New Rule > Fromat onl cells that contain and choose "No blanks" from the left-most drop down list.
Then, enter the following formula in the 4th column:
=IF(AND(A2<>"", B2<>"", C2<>""), 2, IF(AND(A2="", B2="", C2=""), "", 1))
Where A, B and C are your date columns.
Finally, create the following icon set rule for the 4th column:

Hi,
Can I have a complete row highlighted in any color based on if there is any change (addition or deletion) of data from the exiting value?
Hi Rohit,
You can apply a conditional formatting rule to entire rows. Please see this tutorial for more details - How to change the row color in Excel based on a cell’s value. To be able to suggest a formula, I need more info about your data structure and the result you are looking for.
I am creating a task list and I would like to change the fill color of the row depending on to whom the task is assigned. I have created the drop-down list and used conditional formatting to assign colors to the individuals names. Now when I select a name from the drop-down list the fill color changes for that cell. How can I get the corresponding cells in the row to change to the same color?
Hello John,
You just need to apply the rule you created to the entire rows. Please see this tutorial for full details - How to change the row color based on a cell’s value in Excel.
Hi,
I want to change the cell colors in col A based on the values in another cells say Col C. Here, i have conditions that if the values in Col C are in the range <% then green, if + % then yellow otherwise Red..how to get it done!!
Hi!
You can select all cells with data in column A, not including the column header, and create 3 conditional formatting rules based on the formulas like these (assuming that row 2 is your first row with data).
Green: =$C2<50%
Yellow: =$C2>60%
Red: =AND($C2>=50%,$C2<=60%)
For more details, please check out this tutorial: How to change a cell’s color based on another cell.
I am working with recertification dates of about 100 people. I have columns with recertification dates with an adjacent column that allows me to see if personnel are current or overdue. These cells change color based on that value. Their are several columns of data between the name of the indivual and their status. I would like to highlight names of individuals who are overdue. Is there a way to reference another cell so that when they go overdue it highlights their name and when they return current the highlighting goes away?
Hello Matt,
You can do this by creating a conditional formatting rule based on a formula. Select the column you want to highlight a create a rule using a formula similar to this: =$C2="Overdue" (where C is your status column and 2 is your 1st row with data). You can find more information about conditional formatting based on another cell here: Change a cell’s color based on another cell value.
Hi Svetlana,
I am struggling to figure out how to set a value range in my spreadsheet to correlate with specific colors when a value is input in the cells. For instance, I want the cell color to be blue when the value input into the cells is less or equal to 2.0, and if the value is 3.0 - 4.0 the cell will turn green, and if the value input into the cell is greater than or equal to 4.1 it will turn pink. Can you please help?
Thank you in advance for any assistance you can provide.
Julie
Hi Julie,
You can easily do this by creating 3 separate rules in this way:
- Select all the cells you want to color;
- Click Conditional Formatting > New Rule > Format only cells that contain;
- Select the needed option from the drop-down list (2nd box from the left) for each rule - "less or equal to", "between", and "greater than or equal to";
- Click the Format button and choose the format you want for each rule.
You can find the detailed guidance with screenshots here - Creating an Excel conditional formatting rule. Hopefully you will find the info helpful.
This has been so very helpful. Thank you for sharing your wealth of knowledge. I would love to know how to conditionally format a cell colour based on whether a different cell is NOT blank. I have perfected the blank value, how do I do the opposite?
I am also curious if it is possible to use the icon sets to show based on the value (or the blank versus containing data) of other cells. An example, a check list of items that spans a row, a check mark at the front of the row to show all columns have been filled in (contain data, any data) or an exclamation in the first cell to show that there are some cells that are blank, or an x if all cells in that row are blank. Is that even possible???
Thank you for your time
Hi Michelle,
You can create a rule with the following formula: =$B2="" It will color cells in the selected column(s) if a corresponding cell in Column B is not blank. Naturally, you will need to replace B with the column you need, and "2" with the row number where your data starts.
As for the icon sets, I described a solution exactly for this task in my latest article - How to use conditional formatting in Excel. You can go directly to the section How to apply an icon set based on other cells' values. Hopefully, this is what you are looking for.
Oh my gosh that icon set creativity is brilliant!!! Thanks Svetlana!!