3

I like to know if it is possible to split an entire paragraph contained in a single cell, into multiple columns and paragraphs using formula's in Google sheets. This is what the text in the cell would look like:

1 coffeeextradark 240gr

1 milkshake 28Oz

5 chocolatebigones 30 pcs

2 andthelistgoeson 34items

And this is how I would like it to be split up into separate cells

1 | coffeeextradark  | 35

1 | milkshake        | 28Oz

5 | chocolatebigones | 30 pcs

2 | andthelistgoeson | 34items

I found these nice examples how this can be done using formulas combined with Excel's Text to columns tool or using VBA, but can someone help me to do the same using Google Apps Script?

2

Sounds like the =SPLIT function would do what you need. Given that A1 contains the text 1 coffeeextradark 240gr, then

=SPLIT(A1, " ")

(notice the space between the quotation marks)

will split the text into three cells:

1 | coffeeextradark | 240gr
  • 1
    Awesome formula! I applied it in the following ways: =TRANSPOSE(SPLIT, " ") and = TRANSPOSE(SPLIT, Char(10)) – Terence Hoefdraad Jan 25 '14 at 2:50
  • Cool! Glad it worked for you! – Vidar S. Ramdal Jan 25 '14 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.