How to Split Text to Rows in Google Sheets?

Royal96

Power Member
Joined
Mar 16, 2019
Messages
683
Reaction score
376
Here's what I'm trying to achieve:

I have scraped a bunch of content and now I want to extract long tail keywords (questions) from it.


To do that I planned to:

1. Split the text in A1 into rows, separated by "." AND "?" AND "!" so that I have 1 sentence in each row.

2. Filter/Sort rows containing "?"

3. Filter/Sort rows containing "keyword"

Now, for this I have found this formula:

=transpose(split(A1,"."&"?"&"!"))

The problem is that the delimiters "." AND "?" AND "!" get removed, so I can't extract the question keywords in the next step.

Do you know how to keep the delimiters while splitting the text?
 
In case someone is trying to do the same, I have found two solutions:

1) is an online tool to directly extract questions from text:

https://en.toolpage.org/tool/question-extractor
2) is to use find and replace to find the delimiters (in this case "." AND "?" AND "!") and replace it with something like this ".~" AND "?~" AND "!~" beforehand so that there's basically a unique character at the same position which can be used as a delimiter to split the sentences into rows.

Solution found on Reddit:

 
Back
Top