147

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?

3 Answers 3

42

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", ",")
0
245

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

screenshot

0
68

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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