=If cell A1 has text, then B1 changes color

jsecours Posted messages 5 Status Member -  
 huhh -
Hello,

I am looking for a two-part formula:

In the same formula:

If cell A1 contains the letter P = cell B1 turns blue OR if cell A1 contains the letter D, the cell turns red.

Can anyone help me?

Thank you

Julie

2 answers

  1. Patrice33740 Posted messages 8400 Registration date   Status Member Last intervention   1 784
     
    Hello,

    A formula does not change the color of a cell.

    For that, you need to use conditional formatting (CF):
    Home / Conditional Formatting / New Rule ...
    Apply formatting only to cells that contain
    Specific Text / containing / P
    Format / Fill / Blue

    And add another CF for D red

    --
    Best regards
    Patrice
    4
    1. jsecours Posted messages 5 Status Member 2
       
      Yes, that's fine, I can do that to automatically color a cell. It's coloring another cell based on a specific text that's not working, right?
      2
    2. Patrice33740 Posted messages 8400 Registration date   Status Member Last intervention   1 784
       
      MFC in B1 using a formula
      Formula of the type:
      =IF(ISERROR(SEARCH("P",$A1)),FALSE,TRUE)
      0
      1. huhh > Patrice33740 Posted messages 8400 Registration date   Status Member Last intervention  
         

        ftggrfcgr't

        0
    3. huhh
       

      wxtjgj(t'v'(t

      0
  2. DjiDji59430 Posted messages 4278 Registration date   Status Member Last intervention   717
     
    Hello,
    Use conditional formatting

    Best regards
    2
    1. huhh
       

      zdfc

      0
    2. huhh
       

      dbxc'(yh(èyfgkb

      0