Google sheets split with regex or regexextract?
Asked Answered
S

1

5

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.

Secrest answered 9/11, 2019 at 22:41 Comment(0)
T
10

try:

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

0

Twirl answered 9/11, 2019 at 23:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.