search function with or function

winde

New Member
Joined
Nov 27, 2018
Messages
32
how do you incorporate the search & or function into the same formula?

i keep getting #Value with my formula. Any help is appreciated.

=if(search(or("Best","Good","Average"),A1,1)=1,"Pass","Fail")

Thanks.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Try
=IF(MIN(SEARCH({"Best","Good","Average"},A1&" BestGoodAverage",1))=1,"Pass","Fail")
 
Upvote 0
SEARCH doesn't handle an array in its first argument. Here are a couple of alternatives provided A1 will always be a text value.
=IF(LOOKUP(A1,{"Average","Best","Good","*"},{1,1,1,0}),"Pass","Fail")
=LOOKUP(A1,{"Average","Best","Good","*"},{"Pass","Pass","Pass","Fail"})

Note that the first array must be arranged in ascending order.
 
Upvote 0
SEARCH doesn't handle an array in its first argument.
I disagree. Did you try my formula?

BTW, if A1 contained "Fail" or "Bad score" your suggested formulas return "Pass"
 
Upvote 0
I disagree. Did you try my formula?

BTW, if A1 contained "Fail" or "Bad score" your suggested formulas return "Pass"
What I meant was SEARCH alone doesn't handle array arguments. Your formula is clever. Isn't it depending on the MIN function to process the array?

...and yes my formula fails miserably. Should have tested it :oops:
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,167
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top