Comments on: How to change the row color based on a cell value in Excel

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 15. Total comments: 546

  1. Hi Svetlana
    At first i should thank you for your helpful advice to clear my mind about some problems.
    But now,i encounter another problem and hope i can describe it well.

    1- I made a table that calculates the benefit of a deposit money then shows it in a cell(all in a row).It also highlights the row of current day "today()" nfo.
    Since it has too many rows it takes time to find the right one, so i want to show the exact data based on current day in different place for example at the top of the sheet.

    2- Is it possible to show this new row on screen when a user log-in. (something like pop up text ).

    Thanks for your hints even if it doesn,t solve my pb.

    1. Hello Morteza,

      Thank you very much for your kind words! Regrettably, I do now know a way to show a certain row at the top of the sheet. Really sorry for not being able to help you.

  2. Hi Svetlana

    Thank you for you good work.
    How do you change the color of a value in a cell that has changing (RTD) dynamic value:
    Example:
    Cell A1 contents 1000 Text color is BLACK time 00:01
    Cell A1 contents 1001 Text color is GREEN time 00:02
    Cell A1 contents 999 text color is RED time 00:03
    Thank you
    Ian

    1. Hi Ian,

      You can try to do this by creating 3 different rules of the type "Format only cells that contain" that apply to the entire table. Please see this example for step-by-step instructions: How to change a cell's color based on value.

      Though, I have to say I have never tested the conditional formatting rules on data returned by an RTD and cannot say with confidence whether this will work.

  3. thnx alot. this was very helpfull

  4. Hi Svetlana,

    how to highlight first order row of every client? My spreadsheet contains client name, date of acquisition columns and has many entries per client.

    Many thanks!

    1. Hi Marcel,

      I cannot figure out a way to do this with conditional formatting. However, our Duplicate Remover add-in can help. You can download a trial version and then do the following:

      1. Select your entire table, and click "Duplicate Remover" icon on the ribbon, then click Next.
      2. Choose to find "Uniques +1st occurrence".
      3. Select only your "Client ID" column as the key column.
      4. Select the action "Fill with color", choose a color and click Finish.

      The first order row of every client will be shaded with the color of your choosing. Is this what you are looking for?

  5. Hi Svetlana,
    I cannot set a conditional (color) format in (say) cell A1 based on A2 if A2 is a formula. If I type in a hard number into A2 then A1 goes red - it works fine - but when I put the formula back into A2(which delivers the correct answer itself for my spreadsheet)then A1 does not respond ?
    Please help.
    Many thanks
    Owen

    1. Hi Owen,
      In theory, this should work with formulas too, unless you use something very specific. Could you give an example of your real formula, probably this will give me a clue?

  6. Hi svetlana,

    Have another query. Its related to Macro. I have two different work sheets. from the first sheet i have to copy two separate cells and have to paste that in the second sheet. after i paste i will get values generated in the second sheet. then i have to copy the generated values and paste it in the first sheet. this has to keep on goin on a loop. how to do this.

    For example from first sheet i will copy distance and speed and paste in the second sheet. based on these values cost will be automatically generated in the first sheet. and then i have to copy these costs and paste in the first sheet. Then i have to copy next two values of distance and speed from sheet 1 and paste in sheet 2. this has to go as a loop.And the sheets should automatically open.

    Chris

  7. thank you..

  8. Hai Svetlana,

    Thanks for your reply. Second part worked perfectly. But for the first part when i say start date as 20/03/2014 and duration as 2 days then it should consider 20th also. so the end date should be 21/03/2014.

    Cheers
    Chris

    1. Hi Chris,

      In this case, the correct formula is this =WORKDAY.INTL(A1-1,B1,7)

      However, please note that if your start date as 20/03/2014 and duration as 2 days, the end date will still be 23th because March 21 and 22 are Fri and Sat, respectively, and they are days off according to your requirements.

  9. Hi. Thank you for the helpful instructions. I am trying to set the color of a row based on the text in one column, but have a list of words to exclude.
    Therefore, I want the rows where certain words do not appear in a specific column to be highlighted. I would greatly appreciate your help.

    I have tried the following formula without success
    =AND($F17"BLUE", "RED")

    and
    =OR($F17"BLUE", "RED")

    1. Hi Abby,

      If my understanding is correct, you need to highlight rows where neither "BLUE" nor "RED" appears in column F. If so, select your entire table and you can use create a conditional formatting rule with this formula (assuming that your table has headers and row 2 is your 1st row with data):
      =AND($F2<>"RED",$F2<>"BLUE")

      If you want to highlighted rows that contain certain words, let's name them "GooodWord1" and "GooodWord2", but do not contain words-exceptions, say "ExcludeWord1" and "ExcludeWord2", then you will need a very complex formula like this:

      AND(false=ISERR(SEARCH("GooodWord1",$F2)), false=ISERR(SEARCH("GooodWord1",$F2)), true=ISERR(SEARCH("ExcludeWord1",$F2)),, true=ISERR(SEARCH("ExcludeWord2",$F2)))=true

      As you see this formula is very long and that is why your workbook may start working a bit slower than usually.

  10. How to use Conditional Formatting in total Row Like

    Name Age City
    Jaslok 20 Delhi
    Ramesh 21 Jabalpur
    Rama 22 Kanpur

    1. Hi Pratap,

      It depends on what exactly you want to do. If you can give me some more details about your task, I'll probably be able to help.

  11. I am creating a template and I have queries in that. It’s in two parts.

    First Part
    I have a start date of a work. And the no of days the works is going on. In the next column I should get the end date. But it should add the weekends. (For example my works starting date is 13/03/2014 and the no of days of work is 2. Then the work ending date should come as 16/03/2014. (Weekend is Friday and Saturday. Not Saturday and Sunday). I tried using “workday” command but I think it assumes (Saturday and Sunday as weekends).
    Task Name Start Date Duration End Date
    Survey 13/03/2014 2 ?

    Second Part
    There are dates in the column. As per the start date and the end date that we have calculated from part 1 the cells should color automatically. Say if it the work is from 13 to 16th then the cells between these two dates should be automatically colored.
    Start Date End Date 13 14 15 16 17
    13/03/2014 16/03/2014

    Can you help me to do this excel.

    1. Hi Chris,

      You can achieve the desired results in this way:

      Part 1: Use this function =WORKDAY.INTL(A1,B1,7) Value 7 indicates Friday and Saturday as holidays. You can find the complete list of the weekend number values here:
      https://office.microsoft.com/en-001/excel-help/workday-intl-function-HA010354380.aspx

      Part 2: You can try creating a conditional formatting rule with this formula: =AND(D2>=DAY($A2),D2<=DAY($C2))
      Assuming that row 2 is your 1st row with data, A2 is the start date, C2 is the end date, and D is the column containing "13 14 15 16 17".

  12. Hi Svetlana,

    I sent you an email.. hope we can get this solved.

    1. Hi Steve,

      I emailed you back the result.

      The Search formulas work just fine, just make sure you use the first cell with data in the formula, which is D3 in your case:
      =SEARCH("Passed", $D3)=1
      =SEARCH("Annual", $D3)=1

      Also, it is important that you enter the range with your data only under "Applies to" and not the entire column, otherwise the formula will be applied to the first 2 rows too and you will get incorrect results.

  13. Hi Steve,

    Select cells in Colum C that you want to format and create rules with these formulas (assuming that row 2 is your 1st rows with data):
    Orange: =SEARCH("Annual", $B2)=1
    Green: =SEARCH("Passed", $B2)=1

    This should color cells in Column C when the corresponding cells in column B contain Annual and Passed, respectively. If you are looking for something different, please send me a sample workbook at support@ablebits.com and we'll try to figure this out.

  14. Hi Svetlana,

    I have 2 columns-- in one is the Event Name and the other is Event Type

    I want the event name in column C to change color based on the 3 types of events I type in column B

    so if you type Annual I want that event name to change Orange
    if you type Passed I want that event name to change Green

    My problem is its changing ALL of the events the colors because it contains the word annual..

    please help!!

  15. Hi Svetlana,

    for my work i need to enter different values for each row every time.
    i would like for the coloring of the new entry to be automatic to green.
    and i want the previous record to be white again. meaning i want always the latest entry will be colored and the rest colorless.

    is there an easy way to achieve this.

    much thank,

    Joe

    1. Hi Joe,
      This is not possible to achieve using Excel's conditional formatting. Our Excel specialist has written a small macro for you that shades the latest edited cell in green. You can try this solution by copying the macro to your worksheet:

      Private Sub Worksheet_Change(ByVal rnUpdated As Range)
      Static strLastUpdated As String

      If strLastUpdated <> "" Then
      Range(strLastUpdated).Interior.ColorIndex = 0
      End If

      rnUpdated.Interior.Color = CLng("&H00FF00")
      strLastUpdated = rnUpdated.Address

      End Sub

      If you are not very comfortable with macros, this short tutorial may be helpful:
      How to insert and run VBA code in Excel

  16. I have a large spreadsheet that contains two date columns. One of the date columns is column F. I want to highlight every row that has the date 12/31/2013 in column F, but I can't make it work. Thanks!

    1. Hi Katie,

      The point is that Excel stores dates as numbers, starting from January 1, 1900. So, 1-Jan-1900 is stored as 1, 2-Jan-1900 as 2… and 12/31/2013 as 41639. To make the formula work, just enter your date in this numerical format, i.e. =$F2=41639 (assuming that row 2 is your top row with data).

      Another way is to convert the date to the number format is which it is stored: =$F2=DATEVALUE("12/31/2013")

  17. it is not helpful to me as no formula to change the entire row color is sucessful. i want to know how a row will be coloured if a value change. thanks

    1. Regrettably, I'm not able to give any advice without knowing what exactly you are trying to achieve. If you can give an example of your data (including column names), we will try to work out a proper formula.

  18. Hi, If I want to highlight a final result cell based on certain inputs, say "Yes" or "No" in a column. how can i do that?

    If the column C has Yes or No as inputs against some conditions placed in column B then how does it reflect in the final result column D as Yes or No?

    1. Hi AG,

      If my understanding is correct, you want to copy "Yes" or "Now" from column C to column D and then highlight rows in 2 different colors. If so, then enter the following formula in cell D2 (assuming that your table has headers) and then fill that down until the end of your table: =C2

      After that select your table and create 2 rules using these formulas:
      To highlight rows with Yes: =SEARCH("Yes", $D2)=1
      To highlight rows with No: =SEARCH("No", $D2)=1

      If you are looking for something different, please clarify.

  19. I have a spreadsheet in which I have a number of columns. In column a I have a Code that may repeat for 4 rows, then change to another value, then another. How can I easily Highlight the row for each change in column A? Here is a simple example of the data. In the case below, I would want to highlight the first 4 rows in let's say blue, then I do not need to highlight rows 5-8, but then highlight rows 9-12 in blue again, the next 4 no highlight, etc...

    6870meri Property Administrator (Payables)
    6870meri Property Administrator (Receivables)
    6870meri Property Manager
    6870meri Superintendent
    aberdeen Property Administrator (Payables)
    aberdeen Property Administrator (Receivables)
    aberdeen Property Manager
    aberdeen Superintendent
    albionc Property Administrator (Payables)
    albionc Property Administrator (Receivables)
    albionc Property Manager
    albionc Superintendent
    alexandr Property Administrator (Payables)
    alexandr Property Administrator (Receivables)
    alexandr Property Manager
    alexandr Superintendent
    alkenton Property Administrator (Payables)
    alkenton Property Administrator (Receivables)
    alkenton Property Manager
    alkenton Superintendent
    arcadia Property Administrator (Payables)
    arcadia Property Administrator (Receivables)
    arcadia Property Manager
    arcadia Superintendent

    1. Hi Peter,

      If all of your codes repeat for 4 rows, then you don't even need to use conditional formatting. An easier way to zebra stripe your data would be using Excel's table styles:

      1. If you have a range of data, convert it to table (Insert > Table).
      2. Go to the Design tab, right click on the table style you want and choose Duplicate.
      3. Name your new style, select "First Row Stripe" and set it to 4. Do the same for "Second Row Stripe".
      4. Click OK, save your style and apply it to your table by selecting it from the Table Styles gallery.

      You can achieve the same result by creating a conditional formatting rule with this formula =MOD(ROW($A2)+8-2,8)>=4 (supposing that your table has headers and row 2 is your top row with data; if not, then replace -2 with the number of your 1st row).

      If there may be a different number of rows in the Codes column (A), then you will need a bit more complex formula. Create an additional column, say column K, and enter the following formula in cell K2, then copy it across the entire column: =MOD(IF(ROW()=2,0,IF(A2=A1,K1, K1+1)), 2)

      The formula will populate column K with blocks of 0 and 1, every new block staring with the Code change. After that create a conditional formatting rule(s) using the formula =$K2=1 (and =$K2<>1 if you'd want a second color to alternate blocks). Hope this helps.

      1. Much thanks...this will be simple to implement and works like a charm.

  20. Hello,

    I was able to use your directions to change the color of one cell based on the values in another. I would like to repeat this on every row in my document. Each row is in an independent decision. Is there an easy way to copy my rule for one row to the others or do I have to set up each row individually? Thank you.

    1. Hi Carl,

      If you want to apply the same rule to all the rows, then you can simply modify the range it applies to. You can do it in the following way. Select the row to which the rule applies, click Conditional Formatting > Manage rules, select your rule and enter the needed range directly in the “Applies to” field. If you are loking for something different, then please give me an example.

      1. I don't think setting a range will work because the color of cell A1 (in my sheet) is dependant upon a value in A10 and/or A11. The value in B1 will be dependant upon my value in B10 and/or B11 and so on. Each row is an indpendant decision of the other rows. If I apply a range then won't all the colors be the same? I don't want that. A 1 could be anyone of three colors, B1 could be anyone of three colors and so on.

        1. Hi Carl,

          I am not sure I understand your task correctly. Anyway, for the colors not to be the same, you can use a relative reference (without the $ sign) or a mixed reference (relative column and absolute row). For example, if you create a conditional formatting rule with this formula =AND(A1>A$10,A1<A$11) for range =$A$1:$D$9, it will color all cells in column A (A1:A9) whose values are greater than A10 and less than A11; cells in column B with values greater than B10 and less than B11 and so on. If you are looking for something different, then you can send us your test workbook (support@ablebits.com), it's always much easier to come up with the right formula when you can see the real data.

  21. Hi Svetlana,

    I am trying to use the AND function to highlight rows. I want the row to be shaded when column K and column M contain "Yes". I highlight my whole table and apply the conditional formatting rule =AND($K5="Yes",$M5="Yes")it works but only for the top row? How do I make it so the rule is applied to the whole table?

    Also if possible, I would like to shade a different colour when the above is applied and also column I contains any value (either text or number). Is this possible?

    Thank you, I hope this make sense!

    1. Hi Shannon,

      Your formula is correct and it worked just fine on my test sheet. It might not work on your side if for some reason your conditional rule was created for the top row only. You can check it in this way:

      On the Excel Ribbon, click Conditional Formatting > Manage rules. In the Conditional Formatting Rules Manager, choose "This Worksheet" next to "Show formatting rules for". You will see your current rule and the range it applies to. If it is not correct, you can change it directly in the "Applies to" field.

      Also, please check if row 5 is really a top row with data in your table, it not, modify the formula accordingly.

      As for your second condition (when columns K and M contain "Yes" and column I contains any value), it is also possible using this formula: =AND($K5="Yes",$M5="Yes",$I5<>"") Hope this helps.

  22. Thank you, thank you! I have been trying to find a way to make this work based on the dates in the last column of several spreadsheets for a week. I guess I was just asking the wrong questions of Google, but today I found your explanation and was able to quickly (and EASILY) alter it to my needs using the TODAY()feature and adding/subtracting the # of days that would determine a different color.

    Your explanations and the screenshots were fantastic!

  23. is it possible to format a cell that contain numeric and text value on its numeric value only?
    Regards

    1. Regrettably, this cannot be done either with conditional formatting or Excel formulas because they change the format of the entire cell.

  24. hi! i am traying to format each duplicate pair in diffrent color, is this possible? infact, it is a date format and i want to have each date duplicates in same color.
    regards

    1. Hi Muzaffar,

      I don't know a way to do this with conditional formatting. Possibly, there is a way using a VBA macro.

  25. Hi,

    I have created a spreadsheet with a list of contracts including expiry dates when known - I am trying to create a conditional format for the entire row when the contract has expired - I have tried several different combinations including creating a hidden column with the TODAY() formula and using the =$L1<$M1 in the conditional formula L - being the expiry date and M - the today date, but none of the combinations I have tried are working (I have checked and all the dates are entered in the same format - but some dates that are greater than M are being highlighted also....I have also created a conditional format for when the expiry date is empty (L) to leave the format unchanged but it seems to work for some and not for others - I am completely stumped?

    1. Hi Theresa,
      Your formula is correct. I can think of only one possible reason why it may not work properly. If your table has headers, then you need to put it =$L2<$M2 to avoid the "shift" because the real data starts in row 2. Is this the case?

  26. Hi! You know the formula to highlight the row that have the same values in total score column and rank column? Thanks! :D

    1. Hi Josiah,

      You can create a rule with this formula: =$A2=$B2

      Where A and B are your total score and rank columns and 2 is the first row with data. Hope this helps : )

      1. I mean, in my case, T9 and T10 have the same rank. Is there a formula to highlight them? C:

        1. Hi Josiah,

          Sorry, I am not sure I can exactly follow you. I thought you needed to color rows if values in 2 different columns (total score and rank) were the same. But T9 and T10 are 2 different rows in the same column.

  27. I have one help
    in a cell i have keying one letter example A, and i selected same row its reflect full rows A.
    how is i do. need to help me.

  28. Thank you so much for your help. I am trying to use conditional formatting to create two separate colored sections. Here is an example of my data:

    .5 .5
    .5 .5
    1.0 0.0
    .75 .25

    The rule that I would like to set up is a green row appears when the first column is greater that 0 and the second column is equal to 0

    When both columns have numbers that are greater than 0, I would like to set up a blue column.

    Thanks!

    1. Hi Ryan,

      Supposing that your first column is A and your 2nd column is B and your table has headers, you can use these formulas:

      =AND($A2>0, $B2=0) - for green rows
      =AND($A2>0, $B2>0) - for blue rows

      As you understand, you need to replace A and B with the columns where your numbers are located. And if your table does not have headers and your data starts in row 1, change A2 to A1 and B2 to B1.

  29. Awesome, that worked. Thank you!

  30. Hi Svetlana, I am running into an issue and I hope there is an easy fix. The formula below the formatting rule works.
    Example 1:
    =AND($B2="Success", $F2="Approved") the formatting works.

    However when I add an additional formula the results don't format even when true. The issue is my spreadsheet contains the words TRUE in some cells and FALSE in others. I'm thinking the formula think these are some type of operators. When I try and use these values in the formula no formatting takes place.

    Example 2:
    =AND($B2="Success", $F2="Approved", $C2="TRUE") the formatting fails.

    I have multiple columns that have a value of either TRUE or FALSE.
    How can I get around this? I have tried applying different rules but I haven't found a solution yet.

    Thank you,
    RC

    1. Hi RC,

      You are right, Excel perceives TRUE and FALSE as Boolean values rather than text values. So, you simply need to remove quotation marks from TRUE, so that the formula reads: =AND($B2="Success", $F2="Approved", $C2=TRUE)

  31. I am trying to add a rule that will change the color of the cell (C column) if the return date (B Column) is the same (green), one day later (yellow) and over 2 days later (red). I entered the formula on the first row but cannot paste it to any other cells. I need all of column C to reflect column B as I enter the dates.

    1. Hello Sabra,

      If you have already created a conditional formatting rule for 1 row, then you can extend it to the entire table in this way. On the Excel Ribbon, click Conditional Formatting > Manage rules. The Conditional Formatting Rules Manager will open an you choose "This Worksheet" from the drop-down list next to "Show formatting rules for". You will see your current rule and edit the "Applies to" range as you need it either by typing or use the standard Excel button to select the range to the right on the "Applies to" field.

      Also, be sure to use the dollar sign ($) before the column letter in your formula, e.g.
      Green =($C1-$B1)=0
      Yellow =($C1-$B1)=1
      Red =($C1-$B1)>1

      Hope this helps.

  32. Thanks, it helped me format the document easily.

  33. Hello Svetlana

    Im wondering if you can help me i have a spreadsheet set up for work and i need to make it then when i put in a g it turns green and so on with different letters and colours. I can get it that i can change the colour however i need the number to disapper

    Hope you can help

    Thank you

    1. Hello Sarah,

      If my understanding of the task is correct, you want to change the color based on a cell's value and after that the cell's value should disappear. I don't know any way to delete cells' values using conditional formatting. And even if there's such a way, most likely this would eliminate the cell's color too (no value > no color). As an alternative, you can "hide" the value by making the cell's color and font color alike. In other words, in your conditional formatting rule you can set the font color exactly the same as the fill color.

  34. Thank you for looking into it.

  35. Hi Svetlana
    I would like cells colored based on ID numbers they contain.
    What would a formula look like that colors cells with the same values ( ID's) in a list, so the cell colors alternate, but by their ID numbers not just alternating cell by cell or by Company name as ID is linked to different locations of the same Company.
    Example:
    ID No Company
    60416 Company A
    60416 Company A
    60419 Company A
    60420 Company A
    60420 Company A
    60420 Company A
    60420 Company A
    60423 Company A
    60489 Company B
    60489 Company B
    60489 Company B
    60490 Company B
    60490 Company B
    60490 Company B
    60490 Company B
    60159 Company C
    60159 Company C
    60159 Company C
    60159 Company C
    60434 Company D
    60434 Company D
    60434 Company D
    60434 Company D
    60909 Company E
    60909 Company E
    60909 Company E
    60909 Company E
    Thanks

    1. Hi Colin,

      The only solution that I can suggest is to create a separate conditional formatting rule for each ID. In your example, there are 10 different IDs, so you'd need to create 10 different rules. VBA code might probably work too, but it should allow for all the specificities of your real data, so we cannot give any advice.

  36. i have a huge data's and each cell texted mixed color.
    i have done a formula to when ever i mark No.1 on cell will take the target cell which i want (simple : =if(=IF(A1=1,C2," ").

    The problem :
    the problem is the target cell givving me a black color text data, how i can get it as colored as original cell which it have?

    1. Hi Vic,

      If you color your original cells with conditional formatting, then you can simply extend the rules to the column to which you copy the target cells' values. If you color the target cells manually, then you can create new conditional formatting rules to change the font color based on a cell's value.

  37. Hi Svetlana,
    Is there any way to change the background colours of cells when text in those cells is changed to a date? The dates are to go on for the rest of the year(end of 2014).

    1. Hi Vanessa,

      To color cells with dates, first you need to identify the format code of your date, e.g. d-mmm-yy or dd-mmm-yy is "D1"; d-mmm or dd-mmm is "D2"; m/d/yy or m/d/yy h:mm or mm/dd/yy is "D4" etc. You can find the complete list of date codes in this article.

      And then, select a table or a range where you want to change the color of cells, and create a conditional formatting rule using a formula similar to this =cell("format",$A1)="D4" where D4 is the date format and A in the name of the column that contains dates. If your dates may be in 2 or more formats, then use the OR operator, e.g. =OR(cell("format",$A1)="D4",cell("format",$A1)="D2",cell("format",$A1)="D1")

  38. Hi Paul,

    I am not 100% sure that I understand your task correctly, so let me check. If you have 6 in A1, then you want the next 6 cells (B1 – G1) to contain "x". If you have 5 in A2, the next 5 cells B2 – F2 should contain "x" and so on. The maximum value in A is 24. If so, then you can copy the following formula to B1:Y1 and across the same range in other rows: =IF(COLUMN(B1)-1 <=$A1, "x", "") No conditional formatting is needed.

    P.S. I think I have to let you know that I gave up on this task after several unsuccessful attempts.
    The formula was written by Dmitry, one of the best Excel developers in our team, just in a few seconds : )

  39. Hi Svetlana,

    Can you advise how to make cells adjacent to 1 cell with a numeric value change colour or ideally return an x symbol, ie
    Assume cell A1 contains value 6, I need the number of cells adjacent to ideally contain the x value (or be coloured) based on the number in A1, so B1 - G1 would contain x. Need this formulae to work up to a value in A1 of say 24 max. Is this possible ?? - many thanks.

  40. Hi Helen,

    You need to enter the absolute address of the column =ISERROR($A1). If errors may occur in other columns as well, then you need to create similar rules for columns B, C, etc. Alternatively, you can try to combine them all in one rule using the OR operator, e.g. =OR(ISERROR($A1),ISERROR($B1),ISERROR($C1))

  41. Hi Svetlana

    I am trying to make an entire row red when there is one or more #N/A errors. I have used =ISERROR(A1)and selected the range as =$A$1:$AI$16 but it only makes the cells with #N/A in them red not the whole row.

    Please can you help?

    Thanks
    Helen

  42. Hi Son Pratap,

    In your case, you need to select the whole table and create a conditional formatting rule of the type "Format only cells that contain". Then under "Format only cells with", choose the following options: Cell value, equal to, A. You can find the detailed information on how to do this in my other article: How to change background color in Excel based on cell value. Hope this helps.

  43. Hi Svetlana,

    I want to make a sheet which contains only words A,U,P,EL. The condition is when I type A in any cell of the table the background of that perticular cell should change automatically to yellow. and when I type P in any cell then background should change to green like by typing other words they should also change the colour of backgound of any cell in same table.

    Thanks
    Son Pratap

  44. Hi Alan,

    The only solution that I can come up with is using the =AND formula like this =AND($A2"", $B2"", $C2"", $D2"", $E2"")
    It works fine if a table has only a few columns, but this may not be the best approach if you have a large table because as you understand, you would need to list all the columns in the formula. Regrettably, I cannot suggest any better alternative.

  45. Hi Svetlana,

    Was wondering if you could help me please. I have a table made up and i am wanting to highlight an entire row, only when all the cells in that row have information of any kind(text or numbers)in them. So the row would stay unhighlighted if any of the cells were left blank. Basically the entire row would highlight automatically when all cells are complete.

    Many thanks

    Allan

  46. Hi Tatumrs,

    I tested that formula on a table that pulls data from another sheet using a CONCATENATE formula similar to yours, and it worked properly. In fact, it does not really matter whether you enter a value directly in a cell or pull it from another location. This formula (=$E4="x") is very simple and should work anyway, unless you have some specific data format, e.g. dates. Anyway, it's hard to say why it does not work for you without seeing your real data.

  47. Line 26, 27, and 28.

    I attmepted to place the formula you suggested in the conditional formating and it is not working. Any other ideas?

    Ex. I am wanting cell B4 to highlight if cell E4 has "x".

    However, The data is cell E4 is pulled from a different location based on the formula =CONCATENATE(U7G!E8," ")

    Thanks for your help.

  48. Success! Thank you very much!

  49. Hi Chris,

    Try selecting the whole table and then create the formatting rule with this formula =$J2<>"" (assuming that your table has headers). It will color all the rows that have any value in column J. Hope this is what you are looking for.

  50. Hi Svetlana,

    Sorry to trouble you, but I cannot make this work for a date!

    I have one column (J) which is "date of sale". This only has a value if a sale has been made. So, I want to highlight all the rows which have a date in column J (essentially highlighting all the rows where I have made a sale, and leaving the ones where the sale has not been closed blank)

    Can you help?

    Thanks!

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)