How to merge 2 columns into one in LibreOffice or OpenOffice?

In my CSV, I have two columns which are really just one column, so I want to concatenate the content of these two columns - for each row - into the first one(after this I want to remove the extra column)? I use Mac, so I use LibreOffice and OpenOffice.


Solution 1:

I like to complicate things so here what I would do:

  1. select both columns, right click, Format Cells, select Text format
  2. right click first column and select Insert Columns Left
  3. insert formula =CONCATENATE(B2,C2) (or whatever cells you need to concatenate) and pull down so the cells will fill with the correspondent concatenation
  4. select the created first column and copy it
  5. right click first column, select Paste Special and select Text under Selection, None under Operations and Don't shift under Shift Cells (remove all other selections). If warning appears just click Yes for overwriting the current cells
  6. Now we have a column with the concatenated texts, so you can delete columns B and C (or whichever you have concatenated) and this will leave the concatenated text in first column (no formula there)

Solution 2:

The "standard" solution seems too much of a trouble for such a simple thing, so here is what I'll use :

  1. Select and copy your columns.
  2. Paste them into a text editor.
  3. Use your editor "search and replace" function to convert tabulations into spaces.
  4. Copy the result.
  5. Paste it into your Gnumeric/LibreOffice/OpenOffice sheet, checking "fixed width".