Monday, October 24, 2011

How to combine cells in Excel and LibreOffice Calc

In case you need to combine cells in Excel or LibreOffice Calc use the following formula:

E.g. in case you have three following cells:
chr14    71277391    71281827
and need to make one e.g.
chr14:71277391-71281827

use the following formula:


=A1&":"&B1&"-"&C1

Thus, separate cell designations with the sign & except at the beginning and the end of the formula
and additional characters that you want to place between cell designations should be within " "


In this example, we used an example from the BED file and converted the chromosome name and genomic start and end locations into one string that can be used as an ID for that genomic position.

No comments:

Post a Comment