简体   繁体   中英

Excel Conditional Formatting: Highlight cells if not equal

I ran into a problem, where i want to highlight certain cells based on the input from another cell. Here is my quick example of what I would like to achive:

Highlight A1:A2 IF B1 does NOT contain the word " Reactor "

This is what is used and it did not work:

=IF(B1<>(search("Reactor",B1),"",""))

Any ideas how to overcome this little problem?Thank you!

A1 will be highlighted when:

=NOT(IFERROR(SEARCH("reactor",B1)>0,FALSE))

在此处输入图片说明

Probably this can be written in more beautiful way... But it works..

If you want more than one cell (A1:A2) to be triggered by a single cell (B1) you should anchor B1 (here B$1).

Since if SEARCH fails it will respond with an error, you should be able to apply:

=ISERROR(SEARCH("Reactor",B$1))

having selected A1:A2 first (or making that your Applies to range).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM