166

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?

Rubén - Volunteer Moderator -
  • 46,305
  • 18
  • 101
  • 297
user3046061
  • 1,777
  • 2
  • 10
  • 5

4 Answers4

267

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

fstang
  • 2,779
  • 2
  • 10
  • 6
74

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

user0
  • 27,169
  • 10
  • 55
  • 81
48

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

For me replacing comma with worked. Basically I copied an existing row with multiple columns & from that I copied the delimiter. Later on used the same delimiter instead of comma.

vineet
  • 109