=If cell A1 has text, then B1 changes color

jsecours Posted messages 5 Status Membre -  
 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

Patrice33740 Posted messages 8400 Registration date   Status Member Last intervention   1 781
 
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
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
Patrice33740 Posted messages 8400 Registration date   Status Member Last intervention   1 781
 
MFC in B1 using a formula
Formula of the type:
=IF(ISERROR(SEARCH("P",$A1)),FALSE,TRUE)
0
huhh > Patrice33740 Posted messages 8400 Registration date   Status Member Last intervention  
 

ftggrfcgr't

0
huhh
 

wxtjgj(t'v'(t

0
DjiDji59430 Posted messages 4294 Registration date   Status Member Last intervention   714
 
Hello,
Use conditional formatting

Best regards
2
huhh
 

zdfc

0
huhh
 

dbxc'(yh(èyfgkb

0