How can I set multiple search criteria in one function?

How can I collect several criteria in one condition?

=ПОИСК("слово1"; $A1) 

So that there are also words here: word2, word3, etc. So as not to break several rules.

I would like to see something like

=ПОИСК("слово1","слово2"...; $A1)
 0
Author: vikttur, 2019-08-30

1 answers

If you need a condition for the occurrence of all words:

=И(ЕЧИСЛО(ПОИСК({"мама";"мыла";"раму"}; "мама мылила спину папе")))

If a single match is sufficient

=ИЛИ(ЕЧИСЛО(ПОИСК({"мама";"мыла";"раму"}; "мама мылила спину папе")))

In curly brackets, an array of constants. This design allows you to process an array without introducing a formula like the masive formula.

If you need to compare it with several cells, you can also do it, but you can't use an array of constants:

=И(ЕЧИСЛО(ПОИСК(A1:A3;"мама мылила спину папе")))
=ИЛИ(ЕЧИСЛО(ПОИСК(A1:A3;D5)))

And in this case, you need to enter the formula in a special way: before you finish editing the formula, click Ctrl+Shift+Enter, and the formula it should be framed with curly brackets (the attribute of the array formula).

 0
Author: vikttur, 2019-08-30 08:53:10