Forum Discussion

Marius1029's avatar
Marius1029
Copper Contributor
Aug 30, 2022
Solved

Conditional Formatting

I'm a complete beginner and was wondering how to make a bigger cell with adjacent small cells, each having a task, turn a specific color with conditional formatting after all the task are completed.

 

Here's what I mean:

I want the "white_wool" cell to turn green after all the smaller cells are TRUE.

 

Thank you!

  • Marius1029  for this you will need to create a custom formula.  Select the area and then go to conditional formatting and select "New Rule" and then from the list of options select "Use a formula to determine which cells to format"

    You will then get a formula entry box and then below that is where you set the formatting.  In the formula bar you select something like: = AND($D$2, $D$3, $D$4)  if you want the formatting to be applied if D2, D3, and D4 are true. but that is only specific to those 3 cells.

    But lets say you want to apply to the whole sheet (I don't recommend applying conditional formatting to an entire sheet but just for an example) a rule to highlight an entire row if the value in column D is >100 then you want to use =($D1>100)  So the D has the $ to "lock" in column D but as excel checks different rows it will adjust the row from 1 to whatever row it is "looking at".  But I used 1 only because it was the "whole sheet".

    Let's say you are applying to the range D10:G100 and you want any cell with "warning" to be highlighted along with the cell to it's left.  Then you use

    =(D10="warning")+(E10="warning")

    So because the top left most cell of the 'applied to' range is D10 the formula must be relative to that cell.  So if I'm looking at D10 if that cell or the cell to it's right says "warning" I want the rule to apply.  I used + but you could also use OR() excel considers False to be 0 (and applies a value of 1 to True) so if either is true the + will be 1 and since the result is not 0 excel considers that True.

    So in your case you can either do a formula for each "box" you have or create a creative formula if you have many of those "boxes".

    I hope this helps.

  • mtarler's avatar
    mtarler
    Silver Contributor

    Marius1029  for this you will need to create a custom formula.  Select the area and then go to conditional formatting and select "New Rule" and then from the list of options select "Use a formula to determine which cells to format"

    You will then get a formula entry box and then below that is where you set the formatting.  In the formula bar you select something like: = AND($D$2, $D$3, $D$4)  if you want the formatting to be applied if D2, D3, and D4 are true. but that is only specific to those 3 cells.

    But lets say you want to apply to the whole sheet (I don't recommend applying conditional formatting to an entire sheet but just for an example) a rule to highlight an entire row if the value in column D is >100 then you want to use =($D1>100)  So the D has the $ to "lock" in column D but as excel checks different rows it will adjust the row from 1 to whatever row it is "looking at".  But I used 1 only because it was the "whole sheet".

    Let's say you are applying to the range D10:G100 and you want any cell with "warning" to be highlighted along with the cell to it's left.  Then you use

    =(D10="warning")+(E10="warning")

    So because the top left most cell of the 'applied to' range is D10 the formula must be relative to that cell.  So if I'm looking at D10 if that cell or the cell to it's right says "warning" I want the rule to apply.  I used + but you could also use OR() excel considers False to be 0 (and applies a value of 1 to True) so if either is true the + will be 1 and since the result is not 0 excel considers that True.

    So in your case you can either do a formula for each "box" you have or create a creative formula if you have many of those "boxes".

    I hope this helps.

    • Marius1029's avatar
      Marius1029
      Copper Contributor
      Hey! Thank you so much, the =AND formula was exactly what I needed. Now, however, I'm facing a different issue.

      The merged cells do not get crossed out as "complete" like the smaller cells. Any idea how I can achieve that? I want the bigger cell to be marked done once all the smaller ones are.

      https://prnt.sc/4TTK95ecIpa4

      Thanks again
      Marius
      • mtarler's avatar
        mtarler
        Silver Contributor
        did you set that in the formatting section of the conditional formatting?

Resources