I
I
igorkulik2021-09-25 02:58:50
Google Sheets
igorkulik, 2021-09-25 02:58:50

How to select part of the text according to the template in Google sheets?

I have a column with the following cells:
"Romashka Business Center | Offices for rent"
"Buttercup Business Center | Offices for rent"
"Motylok Business Center | Offices for rent"
I need to get the names. Those. extract the text after "center" and before "| Rent".
Of the suitable ones, I found the SPLIT and REGEXEXTRACT functions. But so far I haven't been able to use them.
Can you tell me how to write formulas correctly?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey〒., 2021-09-25
@axifive

REGEXEXTRACT is just what you need, all that's left is to write a simple regular expression:
" ([а-яА-Я]+) \|"
Example

G
Grigory Boev, 2021-09-26
@ProgrammerForever

=REGEXEXTRACT(A1;"([А-Яа-яёЁ]+)\s*\|")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question