Tuesday, October 25, 2011

How to separate a column into multiple columns in Excel and LibreOffice Calc

One of the very useful features of Excel and LibreOffice Calc is the 'Text to column' feature.

In case you have a column that you want to separate e.g. the first column bellow:
chr21:33032286-33032287    rs17881180
chr21:33032856-33032857    rs114905802
chr21:33032987-33032988    rs6650814
chr21:33033000-33033001    rs4816405

and you want to make out of it three new columns
chr21    33032286    33032287    rs17881180
chr21    33032856    33032857    rs114905802
chr21    33032987    33032988    rs6650814
chr21    33033000    33033001    rs4816405

Select the first column
Go to Data/Text to column
Under Separated by type in the separators with the space between.

Before you do this make sure you have made two new columns in between, since the separation would overwrite already existing (2nd) column.

No comments:

Post a Comment