ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Can I use an OR function with SEARCH in conditional formatting? (https://www.excelbanter.com/excel-worksheet-functions/203542-can-i-use-function-search-conditional-formatting.html)

RAYCV

Can I use an OR function with SEARCH in conditional formatting?
 
I am creating a conditional format using the thfe following formula

=SEARCH("rejected",$F4)

I also need the cell to be highlighted if F4 contains the word cancelled as
well.

Brain not in gear can't work it out.

Thanks in advance

Ashish Mathur[_2_]

Can I use an OR function with SEARCH in conditional formatting?
 
Hi,

Try this formula in conditional formatting

OR(ISNUMBER(SEARCH("rejected",A10)),ISNUMBER(SEARC H("cancelled",A10)))

--
Regards,

Ashsih Mathur
Microsoft Excel MVP
www.ashishmathur.com

"RAYCV" wrote in message
...
I am creating a conditional format using the thfe following formula

=SEARCH("rejected",$F4)

I also need the cell to be highlighted if F4 contains the word cancelled
as
well.

Brain not in gear can't work it out.

Thanks in advance



David Biddulph[_2_]

Can I use an OR function with SEARCH in conditional formatting?
 
If you want OR, try
=OR(ISNUMBER(SEARCH("rejected",$F4)),ISNUMBER(SEAR CH("cancelled",$F4)))
You said "as well", so if you want AND, change OR to AND in the above
formula.
--
David Biddulph

"RAYCV" wrote in message
...
I am creating a conditional format using the thfe following formula

=SEARCH("rejected",$F4)

I also need the cell to be highlighted if F4 contains the word cancelled
as
well.

Brain not in gear can't work it out.

Thanks in advance




T. Valko

Can I use an OR function with SEARCH in conditional formatting?
 
A few keystrokes shorter:

=COUNTIF($F4,"*rejected*")+COUNTIF($F4,"*cancelled *")

=COUNT(SEARCH("rejected",$F4),SEARCH("cancelled",$ F4))

--
Biff
Microsoft Excel MVP


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
If you want OR, try
=OR(ISNUMBER(SEARCH("rejected",$F4)),ISNUMBER(SEAR CH("cancelled",$F4)))
You said "as well", so if you want AND, change OR to AND in the above
formula.
--
David Biddulph

"RAYCV" wrote in message
...
I am creating a conditional format using the thfe following formula

=SEARCH("rejected",$F4)

I also need the cell to be highlighted if F4 contains the word cancelled
as
well.

Brain not in gear can't work it out.

Thanks in advance







All times are GMT +1. The time now is 03:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com