Avatar of Andreamary
Andreamary

asked on 

Basing conditional formatting on more than one text string

I am using the following formula in conditional formatting to change the cell in column AE to yellow when the criteria is met:

=AND(ISBLANK(AE2)=FALSE, ISNUMBER(SEARCH("DND",D2)))

I need to revise the formula to include an additional string of "MDN", so that the criteria is now:

If AE2 is not blank, and D2 has text string "DND" or "MDN", then change cell AE2 to yellow

I took a stab at trying to solve it myself with the following formula but it did not work for either "DND" or "MDN":

=AND(ISBLANK(AE2)=FALSE,IF(OR(ISNUMBER(SEARCH("DND",D2))),ISNUMBER(SEARCH("MDN",D2)))

Thanks!
Andrea
Microsoft Excel

Avatar of undefined
Last Comment
Professor J

8/22/2022 - Mon