Ranjan Kumar Singh
Ranjan Kumar Singh

Reputation: 45

How to split text in Google Sheets by searching exact word?

I have a text Ahimsa Industries Ltd (NSE:AHIMSA) in the cell A30.

I need to split/find NSE:AHIMSA and Name Ahimsa Industries Ltd.

I have created a formula to split text is =SPLIT(A30, "NSE:")

I expected result as Ahimsa Industries Ltd ( and NSE:AHIMSA)

After that I have used formula

=LEFT(I30,LEN(I30)-1)

to get result as "Ahimsa Industries Ltd" And

=LEFT(J30,LEN(J30)-1)

to get result as AHIMSA. But I am not getting the expected result.

Upvotes: 0

Views: 139

Answers (1)

z..
z..

Reputation: 13156

You can use REGEXEXTRACT, like this:

=REGEXEXTRACT(A30,"(.+) \((.+)\)")

Another solution using SPLIT

=SPLIT(SPLIT(A30,")")," (",0) 

Upvotes: 1

Related Questions