Update (Evan): This isn't built-in feature but it can be added
The first technique uses some spreadsheet function magic
In cell B2 paste the following:
=ARRAYFORMULA(IFERROR(SPLIT(A1:A;"|")))
Then paste your data starting with cell A2. As soon as you enter the data it will automatically split the combined values to a value-per-column using the '|' as a delimiter.
Here's credit to the original author of this approach.
The second approach uses some scripting magic to extend Docs
Goto:
Tools -> Script editor...
Paste the following:
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menuEntries = [];
menuEntries.push({ name:"Text to column", functionName:"textToColumn" });
menuEntries.push({ name:"Text to column (custom separator)", functionName:"txtToColumnCustom" });
ss.addMenu("Advanced", menuEntries);
}
function txtToColumnCustom() {
var separator = Browser.inputBox("Text to column","Enter the the separator",Browser.Buttons.OK);
textToColumn(separator);
}
function textToColumn(separator) {
var sep = typeof(separator) != 'undefined' ? separator : ',';
var ss = SpreadsheetApp.getActiveSheet();
var c = ss.getActiveCell();
var input = c.getValue();
var values = input.split(sep);
var row = c.getRow();
var col = c.getColumn();
ss.getRange(row,col,1,values.length).setValues(new Array(values));
}
Save and close the script editor. Then, refresh the spreadsheet. It'll take a second to load but you should see a menu called 'Advanced' popup after 'Help' in the toolbar.
To use it:
- Select the cell containing the values
- Select 'Advanced' -> 'Text to column (custom separator)'
- When the prompt pops up enter '|' (without quotes) into the field and hit enter
It's magic, it'll automatically split the values out into columns. If you were wondering the non-custom 'Text to column' function uses commas as separators.
This version only works on one row at a time. I have been doing a lot of custom Google Apps Scripting lately so it literally only took about 20-30 minutes to get this from concept to working. If you want one where you can select and split multiple rows just request it in the comments or use the formula above.
Whatever you do, don't underestimate the power of Google Apps Scripting. In the right hands, it is capable of doing amazing things.