Forum Discussion

RhiLew's avatar
RhiLew
Copper Contributor
Jan 06, 2024
Solved

How to change the colour of a cell based on another value

Hi Everyone,

Happy New Year! 

 

Looking for some help please. I have already applied conditional formatting to this spreadsheet to highlight improvement (green) or decline (red) in figures. However, because the rest of the cells appear red (because the value is <K), it is difficult to see clearly who is in red. Is there a way to either 

1. stop the cells (M:Q) with no data turning red until a value is input

or (even better)

2. Make the name cell (A:B) fill red if the value of any M:Q < K ?

 

 

Thanks in advance! 

 

 

  • Hi RhiLew 

    Happy New Year too

     

    or (even better) Make the name cell (A:B) fill red if the value of any M:Q < K ?

     

    Conditional Formatting rule that applies to (with the above example) $A$5:$B$9:

    =COUNTIF($M5:$Q5, "<" & $K5)

     

  • kimjl's avatar
    kimjl
    Copper Contributor

    Visit This article: https://techcommunity.microsoft.com/t5/excel/i-need-to-change-the-color-of-all-cells-in-a-row-based-on-the/m-p/3951857#M207727

     

    To change the color of a cell based on another value in Excel, you can use conditional formatting. Select the target cell, go to the "Home" tab, choose "Conditional Formatting," and then select "New Rule." Pick "Format cells that contain" in the rule type, set your condition (e.g., equal to, greater than), and choose the formatting options, including the fill color. This way, the cell color will automatically change based on the specified condition in the adjacent cell, making data visualization and analysis more intuitive.

    Also visit Get Dressed Shop.




     
     
     
    • RhiLew's avatar
      RhiLew
      Copper Contributor
      Thank you, this is what I have applied to the remaining cells. However, my knowledge of formulas is rather limited so I am a little stuck beyond this. The above reply is comprehensive though. Thank you
  • Lorenzo's avatar
    Lorenzo
    Silver Contributor

    Hi RhiLew 

    Happy New Year too

     

    or (even better) Make the name cell (A:B) fill red if the value of any M:Q < K ?

     

    Conditional Formatting rule that applies to (with the above example) $A$5:$B$9:

    =COUNTIF($M5:$Q5, "<" & $K5)

     

    • NMilner's avatar
      NMilner
      Copper Contributor

      Hi sorry for jumping on the post. I am currently trying to do the same kind of thing but with a variable rule. My sheet consists of F - Cost in £, H - Sold in £ and I- Profit in £. I have a formula to complete H once a value is entered in G but I am trying to change the text colour in A-J once I is complete. I have tried both methods stated in the thread but must be missing something.

    • RhiLew's avatar
      RhiLew
      Copper Contributor
      Oh wow - you are my hero! Thank you so much 🙂
      • Lorenzo's avatar
        Lorenzo
        Silver Contributor

        RhiLew You're welcome & Thanks for marking the solution (helps people who Search)

Resources