60

Say I have a string of: l,f,x,a,s,f

I would want to paste this every comma-separated value over 6 adjacent cells. How would I do it?

20

You can paste it into a split function in a cell and it will break it apart into multiple cells for you:

=SPLIT("l,f,x,a,s,f", ",")
82

From https://support.google.com/docs/answer/6325535?hl=en :

  • Open a spreadsheet in Google Sheets.
  • Paste the data you want to split into columns.
  • In the bottom right corner of your data, click the Paste icon.
  • Click Split text to columns. Your data will split into different columns.
  • To change the delimiter, in the separator box, click

PS: There is no option for 'TAB' if your text is tab-separated, you can try 4 spaces as custom separator

  • 4
    After pasting in the CSV data I get no Paste icon. But in it's place is a tiny square that acts as a "handle" for resizing. Because of your answer I tried right clicking it and low and behold the Paste options then appear and I can choose Split. Thanks – rob May 21 '18 at 9:18
  • 1
    I was going to write the same comment as @rob, thank you! – Graph Jan 5 at 21:17
  • 5
    This should be the accepted answer. – Clive Portman Jan 18 at 9:27
10

You are able to paste CSV data as is into the spreadsheet and go to Data selecting Split text to columns... and even further specifying the delimiter:

0

0


Also, you can simply use keyboard shortcut combo:

LEFT ALT + D + E


And as already mentioned SPLIT formula:

=SPLIT("l,f,x,a,s,f"; ",")
=SPLIT(A1; ",")

For a range/array it would be:

=ARRAYFORMULA(IFERROR(SPLIT(A1:A; ",")))

0

  • That worked in Calc (libreoffice). The Data menu has a "Text to Columns..." option and it worked just as intended. – Alexis Wilke Sep 30 at 23:03

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.