jason
jason

Reputation: 4439

Google sheets split with regex or regexextract?

Say I have a cell with the following string 1. Finely chop onion & mushroom put in bowl 2. add beef, soy sauce, salt. mix 3. put patties on baking sheet 4. cook 5 mins, flip and bake for another 5 mins.

I want to split the string so that it is into 4 cells stacked vertically 1. ... 2. ... 3. ...

I tried something like =split(A1,"\d.") but that doesn't work. not sure if regexextract can do it with one line of code.

Upvotes: 5

Views: 8888

Answers (1)

player0
player0

Reputation: 1

try:

=TRANSPOSE(SPLIT(REGEXREPLACE(A1, "(\d+\.)", "♥$1"), "♥"))

0

Upvotes: 12

Related Questions