Learn how to quickly change the color of the entire row based on a single cell's value in your Excel worksheets. Tips and formula examples for number and text values. Continue reading
by Svetlana Cheusheva, updated on
Learn how to quickly change the color of the entire row based on a single cell's value in your Excel worksheets. Tips and formula examples for number and text values. Continue reading
Comments page 8. Total comments: 546
I Need help from u
i wants color to colum in 1-10 then after 10-20colum i needed to give another color how can i?
I have two columns with dates. I have shaded the first column with some specific dates. I want to shade same dates in the second columns with the help of some formulas.
Thank you
Hi,
I use excel to create daily reports for my team. It involves copying data from an internal site and pasting it into excel so i can manipulate it and make it useful for us. The problem is the data comes with links (which I need). This ruins any conditional formatting I may have on the template used to create the reports.
Is it possible to keep the source formatting and have text in a single cell change the color of a row?
HI, i have data in two column in one excel sheet, now in another sheet i am linking the same data by clicking + sign. But Data is linking but the problem is: when i changed cell color in one sheet its not changing in another excel sheet particularly for that cells only
pl help
Peoples i need help as i suck with excel.
I would like a row to be highlighted if there is nothing in the last two cells of that row. However there would be data in each of the other cells in said row.
Hi Svetlana,
there are two things GOOD & BAD (say 2 ROWS)
I want a formula that will make "BAD" row Backgroud RED in color and NO COLOR IF GOOD
So Is it possible that certain formula for colors exist?
Regards,
Savinn
Apologies. The formatting formula we are using is "$C2>0", cheers. Z
Dear Sir,
This is a very valuable post. I learned a lot from it.
I was wondering if there is a way to change the color of a cell "Only" when the value of the sell change from a certain value to another, without changing other cells that got same value under the same formula.
I will try to explain better: I have "Stock" column which has only one of two values in its celle: either "0" or "10".
Items that are out of stock have value of "0" while any other item that is in stock (or comes back to stock) get value updated to "10" because we never re-stock items less than 10 units minimum in quantity.
My issue is not by having items becoming out of stock because we have a control on this. The issue is that some items come back to stock but we never notice early, therefore we miss the chance to increase the quantity as the quantity will remain zero in the marketplaces we are selling our items on.
With your code, I was able to use formula "$C2<0", however, it changes to color to all items that we have "10" in quantity, regardless whether they were already having "10" or got updated from zero to ten, making your formatting formula not very beneficial to me.
Is there a way to highlight only the cells that specifically get values updated from zero to ten without affecting the cells that already got value of "10" in first place?
I look forward to hearing from you or anyone else who has the knowledge of dealing with this matter.
Best regards,
Zed Sefi
I am using the following formula that I pieced together after some research online. It seems to be working in the example I tried it on, but I don't fully understand the entire formula. I want to interpret so I can figure out whether or not it will work for similar checks and balances. The formula and reason are as follows:
=AND(ISBLANK($D5)=FALSE,NOT(ISNUMBER(MATCH($D5,$E5,0))))
Looking for a cond format that will fill column D if its respective C cell is not the same value/text (d1="x" and c1=""), but will not fill is column d is blank, d and c are blank, and d and c match.
Can you help interpret the formula and if it will work for an entire spreadsheet comparing 2 columns (separate conditional formats)?
Hi Svetlana
Not from want of trying, I have failed to have a colour of a row changed from red to green if column F has a number in it
On another sheet I would like to mark the whole row as green if the number in column R is greater than 65.
Please help
Darcy
How to change automatically the text color based on a cell's matched text in Excel
pleas sand me condition formatting function.
IF
AND
IF(AAAA,)AND)
Hi
If I want to highlight any cell in the column that contains a number larger than the previous one in the same column, what should I do?
Hello, Gloria,
Please try the following:
Go to Conditional Formatting -> New Rule -> Use a formula to determine which cells to format
Enter the following formula:
=AND(ROW(A1) <> 1, A1>OFFSET(A1, -1, 0))
Hope this helps.
Hello Maria
Thank you for your above explanation.
My predicament is the same as Gloria's "If I want to highlight any cell in the column that contains a number larger than the previous one in the same column, what should I do?"
I have tried your formula and I cannot seem to get it to highlight the cell.
In the example below, I would like to see -11.41 and +3.09 highlighted, because in both instances the cell above it, is >10 value points away from it.
-33.22
-26.75
-22.19
-11.41
-8.21
+3.09
+8.03
What would my formula be? To make it easier for me to work with, the nominated cell numbers are:-
-11.41 is H51
and
+3.09 is H53
I hope I am making sense :)
Many thanks
David
Is it possible to use conditional formatting to put a coloured border underneath a row where the date in column A changes.
So if you had a table with:
14-01-16
14-01-16
15-01-16
16-01-16
It would put a different coloured border under each different (unique) date.
Hi
I want to color my a row which contain "E" in a cell of that row.
please provide me a solution for my problem
I want to colour my employee id numbers with red and green which is randomly upto 1200 numbers anybodycan you help me to make conditional format on this
Hello Rathna!
Please use the Home Tab -> Condition Formatting -> Color Scales command
You can use the "More Color Scale Rules" additional command to define a custom "2-Color Scale" format style.
Hi,
I want to colour my bar chart "bars" based on the text written inside the bar chart "bars". ( ie if "A" is written in first bar- the bar colour should turn to red, if "B", then blue and so on), the text in the bar is dynamic and changes with the data.
Can you please advise.
Thanks
Sam
Hello Sam!
I recommend you to add an additional data range for the conditionally formatted bar chart.
Please see the following example that demonstrates a Conditionally Formatted Bar Chart.
https://support.ablebits.com/blog_samples/excel-conditional-formatted-bar-chart_200.xlsx
Thanks Fedor.
Actually I want the different "bars" within Bar chart to change colour automatically based on "Text" written within the "Bars".
ie if the text entered in the "Bar" is North, the "Bar" colour should be filled with "yellow" colour, and so on.
Thanks again.
Hi,
1-3,7-9,13-15 till last row how can change "Bold" in VBA
4-6,10-12,16-18 till last row how can change "Italic" in VBA
Please give me suggestions.
Hi, I am trying to conditionally format cells in one column based on overdue dates in another column. Specifically, I want cells in column A to turn red if the date in column P (corresponding row) is past due. When I set my conditional formatting for column A, this is the formula I have inputted: =$P2=TODAY . I also want to set up a second rule for due dates 90 days out, where the corresponding row in A turns blue. This is the formula I have inputted for this conditional format: =$P2<TODAY+90 . Neither format is working however, so I know I'm doing something wrong. Can you point me in the right direction? Thank you!
Hello, Paige!
You should add brackets after the TODAY function to create conditionally formatted cells based on the overdue dates: "TODAY()".
Please see the following sample that demonstrates how to fill overdue dates using the NOW() or TODAY() function in a conditional formatting rule.
https://support.ablebits.com/blog_samples/conditionally-format-based-on-overdue-dates_198.xlsx
Hi There, Can someone please help me with a conditional formatting to change a whole line colour based upon whether its Saturday or Sunday.
I am using =E12+1 where E12 is a date 01/01/16 to have my cell look like this Saturday, 2 January 2016
I had supposed using =SEARCH("Saturday",$E13)>0 to change the whole line but obviously the formula for dating does not contain "Saturday"
Hello Dean,
You can use the "Use a formula to determine which cells to format" rule type with the following formula: "=(OR(WEEKDAY($F5,1)=6,WEEKDAY($F5,1)=7))"
Please see the following example:
https://support.ablebits.com/blog_samples/conditionally-format-based-on-weekday_197.xlsx
I hope this helps.
You have saved Preston. Thank you.
Hello All,
i am facing one issue:
suppose in a row, there is one box with green color.
what formula should i use for this to know that in row we have different color?
Hi,
I am trying to conditionally format a row which is reference another cell.
EX - IF A1 is some number like(1/2/3/4) & B1 is YES/NO.
if in A1(1)=B1(No) then A1 become condition by color & if Yes another color.
Help
What formula would I use, if I want the text of a row to be red if one particular cell is blank and another is not blank in said row.
Hi Svetlana,
I am trying to conditionally format a row of numbers based on a manually entered number in cell c4 my data is from cell A11 to I39 for ex if I enter a random number between 10 & 24 in cell C4 I would like the corresponding row to be a different color, I have managed to do this but it will only format the FIXED numbers from A11 to A39. Thanks in advance for any help you can give me its driving me crazy..
I'm trying to make a cell match the color of another cell. I want A2 to match K2 (which is a date) the same color. K2 is formatted to change to red when it is 90 days out from today.
Hello Derrick,
I recommend you set the same conditional format for both cells:
Please see the following example:
https://support.ablebits.com/blog_samples/excel-change-row-background-color_191.xlsx
Hi Svetlana,
Im having some problem. Let say my table is as follow:
A B C D E F G
1 2 3 4 5
6 7 8 9 10
I want to change the cell's colour based on the other cell value, for example:
A B
1 DONE
2 NOT
3 DONE
4 DONE
5 DONE
If the word in column B is 'done", the cell 1 in the upper table will turn blue, let say. How to do it? The sequence of the numbers in upper table also not in order. It involve a lot of numbers and im not able to do it cell by cell. Please help me..
Hello, Farid!
You can use the "Use a formula to determine which cells to format" rule type with the following formula: =(LOOKUP(A1,Sheet2!$A$1:$A$10,Sheet2!$B$1:$B$10)="DONE")"
Please see the following example that demonstrates how to use the LOOKUP function in a conditional formatting rule:
https://support.ablebits.com/blog_samples/excel-change-row-background-color_190.xlsx
Hi Svetlana,
thank ypu very much for your post. Really useful. I just have the problem that saving and reopening the file,it doesn't keep the conditional formatting set. Do you know whay it might be?
Thank you very much in advance,
Valeria
I am trying out this example on my Excel 2013 and I get an error that "we found a problem with this formula.."
I have defined a rule with the formula below:
=OR($D2="Due in 1 days",$D2="Due in 7 days")
Hello Boniface,
Most likely the problem is in a different List Separator. This formula is written with a comma, which is the default List Separator in North America and some other countries. In European countries the comma is reserved as the Decimal Symbol and the List Separator is set to semicolon. So, try replacing "," with ";" like this:
=OR($D2="Due in 1 days";$D2="Due in 7 days")
helo guys,
I need a help on excel where i have 500 id numbers in duplicates. like
Id subject grade
1001 xxxx A
1001 YYYY A
1002 XXXX B
1002 YYYY EX
1001 ZZZZ B
i have data like above. Here what I need is, want to highlight id column with different colors. Id should get same color even if i have duplicate data in workbook. Please help me out on this. Thanks in advance.
helo guys,
I need a help on excel where i have 500 id numbers in duplicates. like
Id subject grade
1001 xxxx
Hi,
I’m not sure if this is still open for questions but if so, I would really appreciate your help.
In column A I have a list of sites. In column B I have a set of random dates which highlight the day in which these sites had been uploaded to the excel sheet. In columns C,D and E I have names (E.G C; John, D; David, E; Sam). These last three columns also have drop down menus with an option which needs to be selected for each site row. If any individual has not selected an option from the list when Column B had passed 5 days I need each of the name columns to turn orange. If the date passes 10 days I need the name cells for that row to turn RED. Is this possible with conditional formatting? I have seen this done previously but the sheet had been deleted so I am unable to copy formula. Can you please help?
Thanks!
Hello Hannah,
Can you please send me your sample workbook at support@ablebits.com and an example of the result you want to get?
Hi Svetlana,
I was looking for a way to visually separate rows by category with color, I have 1-3 rows in a row that can be the same category. As if I could control the banded color of a table based on a variable - So the best I came up with was identifying whether the variable was new or the same as the last row, so there is one variable that just says "New" or "Same". I am trying to get all the "New" rows one color and all the "Same" another color. I am having trouble with the formula to highlight the whole row based on cell text, it only wants to highlight the cell or it highlights every row. The formulas are =$E$2="New" and =$E$2="Same" applied it to the whole range but it doesn't work. Am I missing a step? Or is there a better way to visually separate by a variable for viewing purposes?
Thanks!
Hi Dear,
Is there any way to highlight number of cells based on entering a number on first cell for instance; i enter number 10 and automatically it highlights 10 cells ahead?
Thanking you in advance
Hi Svetlana,
I have an excel file which is shared between 4 people and conditional formatting doesnt work on a share file.
What would you recommend?
I want to change the color of a row from E4:G4 if the text value of Cell I4 is "Done".
Thanks,
My Online Teacher :)
I am trying to fill an entire row a different colour depending on date(month).
I have set up conditional formatting to give different colours in the cell containing the date using cell value, but I cannot make this stretch across the row, every formula I have tried does not work.
How can I get around this?
I have entered a date and time in a cell and I want the cell next to it to turn green in exactly 24 hrs. How do I do this?
Hi Reuben,
Assuming you have a date and time in cell A1, you can create a rule based on the following formula:
=(NOW()-$A1)*24>=24
I want to highlight a CELL based on number of times its values changed.
e.g.
1)IF the cell value is changed '2nd TIME' it should highlight "Green".
2)IF the cell value changes '3rd TIME', it should highlight "BLUE" and so on...
Hi admin
how to highlighted condtional formatting color row A number above row B also colour not updated 0.
Regards
SP
I would like to be able to change a row to a colour if the cell G2 contains "A" to yellow "B" to green and "C" to red. I would like to continue this in all rows of column G. My issue is I can do this for row 2 but when I try to do it for the column G when I put text in 'G2' it changes all other rows.
Will I have to create a macro?
Hi Karl,
A macro is not needed in this case, the task can be handled by a conditional formatting rule. The key point is to use proper cell references - absolute column and relative row: =$G2="A"
Also, make sure you apply the rule to a range beginning with the same row as referenced in the formula, row 2 in your case.
Hi admin
how to highlighted condtional formatting color col A number above col B also colour not updated 0.
Regards
SP
Hi Admin
What i want is really very simple but im having trouble.
i have 6 colums 2A to 2F i want all the background colours red there will be a number in colum 2A and 3A and when i put a number in colum 4A i want all colums 2A to 2F to change to gree ?
Regards
justin
Hi,
I am having trouble changing cell colours for some reason. I have used the formulas as suggested but the formula will not work. I'm not sure what I am doing wrong! I want to change the colour of the cells in the L column if they are blank and if the cells in the W column have been entered as 'No'. I have entered the formula as =AND(L2="",W2="No"). Could you tell me what I am doing wrong as I cannot work it out?
Many thanks
Hi Farhat,
The formula is correct. Just make sure the rule applies to column L beginning with cell L2. Also, you'd better fix the columns by using the $ sign:
=AND($L2="",$W2="No")
Hey Admin. Hoping you could help me out here.
In my excel sheet i have columns for start date, number of months and end date. If the number of months is 7, 2 columns, i.e column D and E must get highlighted. If number of months is 3, columns D,E and F must be highlighted. How can i do this. Please help.
I have a data with Columns; Entry No, Date, Activity, Target Date, and Completion Status.
I want My rows color to change based on Target Date and Completion Status.
if Target date is within 7 days row colour must be Orange.
if Target date is due row colour must be red.
If Completion status is completed row colour must be Green
pls hlp me
Thanks for answering all of our questions!
I have a problem with using this formula.
I have 9 columns A to J
i'd like to have a row changed to a specific colour depending on the contents of the cell in column C
C has two states, 'INSTALLED' and 'REMOVED'
essentially if the cell reads 'REMOVED' then i want that row to be colored yellow. If it reads 'INSTALLED' i want it colored green.
It seemed like you already covered this in the article but your process did not work for me. I even tried adding new test rows and changing the value of the cell in column C but there was no change.
The formulae i used were "=$C="REMOVED" and "=$C=INSTALLED"
Thanks for your help!
Hi Bob,
You need to refer to your top-most cell in the formula. For example, if your data begins in row 2, the formulas are as follows:
=$C2="REMOVED"
=$C2="INSTALLED"
after trying it again, i realised that i had selected the cells using the column headers rather than selecting the cells by draggin a selection or shift-clicking.
All seems to work now!
Thanks!!!
Thanks for your help Svetlana, that is almost perfest but I want the formula to work whatever date I put in column M, is it possible? :-)
Julie,
Of course, it's possible. In this case, the formula is even simpler :)
To color a row if a cell in column M is not empty (contains any value - number, date or text):
=$M2<>""
To color a row if a cell in column M is a number or date (dates are stored as serial numbers in Excel), but do not color a row if column M contains a text value:
=ISNUMBER($M2)
your blog has helped me so much but I just need a bit more help, I am using the following formula to shade a whole row green once the word 'completed' has been added to cell M but I would really like this to be a 'date' rather than the word 'completed', I have tried a few things but I am a beginner on excel. The formula I am using is =$M2="COMPLETED" is there an easy way to change this to a date? thanks in advance
Hi Julie,
If you want to highlight a row when a certain date is entered in column M, you can use a formula similar to this:
=$M2=DATEVALUE("01/01/2015")
You can find more formula examples of Excel conditional formatting for dates in the following tutorial:
https://www.ablebits.com/office-addins-blog/excel-conditional-formatting-dates/
If you don't find an answer there, please elaborate a bit on your task and we will try to make a proper formula.