0

For one of my excel sheet, it is required to highlight the cells that has specific keyword in it. To solve this, i have created a list called my_list which contains value1, value2 & value3.

I have used below formula for highlighting the column D

=OR(ISNUMBER(SEARCH(my_list,D1)))

It's working fine for the column D

I want this to be extended for all the columns in the excel sheet

its very tedious to write the above formula for all the columns

is there any change that can be made to above formula which works for all the columns/entire excel sheet?

I tried with below which didn't help

=OR(ISNUMBER(SEARCH(my_list,my_excel)))

where my_excel is the selection to all cells in the excel sheet

can you please help with me this?

3
  • To highlight, do you mean that you are using your formula as part of conditional formatting? Commented Aug 28, 2021 at 7:48
  • Yes..I'm using that formula as part of conditional formatting
    – Ajay shifu
    Commented Aug 29, 2021 at 10:01
  • You'd better provide the sample about your requirement, it's related to the cells reference and formula.
    – Lee
    Commented Aug 30, 2021 at 8:16

1 Answer 1

0

oops - I focused too much on the formatting issue and not on the formula. You need to change it. So here is a revised (and correct) answer:

You can select the entire worksheet by clicking the upper corner and then apply conditional formatting to all of it as follows:

step1

select New Rule. Then select Use a formula...

steps 2 & 3 revised

end enter this formula using MATCH because SEARCH will convert the numerical contents to text and then look at the characters in mylist. If you have numerical values in mylist or in your cell contents, SEARCH will give you false positives. So change it to this:

=OR(ISNUMBER(MATCH(mylist,A1,0)))

Make sure that there are no $ in the address for A1.

Set your formatting and this should work when you click OK or Apply.

1
  • thanks for the detailed solution
    – Ajay shifu
    Commented Sep 19, 2021 at 17:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .