D
D
Dmitry Karmazin2014-12-19 17:05:18
Google Sheets
Dmitry Karmazin, 2014-12-19 17:05:18

How to make a search formula for two text samples in a Google spreadsheet?

I need to get an answer whether there is text "7777" or text "9999" in text cell D5.
If the task was to get an answer about only one sample of text, I would use the formula
=SEARCHB(7777;D5)
But how to make a formula with two samples?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Ivanov, 2014-12-28
@oshliaer

Use regular expressions for complex string operations.
For one cell
=REGEXMATCH(T(A1),"7777|9999")
For a range
=ARRAYFORMULA(REGEXMATCH(T(A1:A12),"7777|9999"))
If it is known in advance that only text is in the range, then the formula T()can be omitted.
Example How to make a two-way search formula in a Google spreadsheet...
Regular expression test (link)
4c0deb3728b24ab9a94a6123eb1956ef.png

D
Dmitry Karmazin, 2014-12-23
@dkarmazin

Or at least tell me how to use a formula to calculate that there is a number in one of the columns, while in one of the columns the result is "#VALUE!"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question