Shading cells based on the text in other cells

Solved
lucas82_4761 Posted messages 11 Status Member -  
Mike-31 Posted messages 18405 Registration date   Status Contributor Last intervention   -
Hello,

I have a small problem with my Excel spreadsheet...
After reading several forums, I still can't find the right formula for "conditional formatting."
In my table, column A will contain cells with either the letter "p", "g", or "O."
I would like, depending on the contents of these cells, to shade the three adjacent cells in columns B, C, and D.

If any cells in column A contain the letter "p" and "g," then it should shade the cells in the same row in columns B, C, and D.

Thank you in advance for your help.

3 answers

  1. Mike-31 Posted messages 18405 Registration date   Status Contributor Last intervention   5 147
     
    Hello,

    start by selecting the range to colorize, for example B2:D20
    Conditional formatting
    the formula to test is
    =OR($A2="P",$A2="G")
    <Format/Fill/Pattern style select the one that fits
    --
    A+
    Mike-31

    I am responsible for what I say, not for what you understand...
    2
    1. lucas82_4761 Posted messages 11 Status Member
       
      I did this but the result is random; it hashes when there are "p" and not others, and the same goes for "g".
      0
    2. lucas82_4761 Posted messages 11 Status Member
       
      My bad, I made a mistake.
      0