Ask Your Question

How to convert merged cells into ordinary cells and copy data from merged cells to ordinary cells? [closed]

asked 2015-12-10 09:58:49 +0200

froz gravatar image

updated 2020-08-28 00:13:30 +0200

Alex Kemp gravatar image

In LibreOffice Calc on Windows 7:

Type in data in the following cells:

A2: Country1

A4: Country2

B2: Customer1

B3: Customer2

B4: Customer3

B5: Customer4

C1: Quantity

C2: 100

C3: 100

C4: 100

C5: 100

  1. Mark cells A2 and A3 and click button on toolbar "Merge and Center Cells".

  2. Mark cells A4 and A5 and click button on toolbar "Merge and Center Cells".

  3. Click on C1.

  4. Click on Autofilter icon from toolbar.

  5. Click on the filter arrow from A1 cell and you will notice beside Country1 and Country2 also a "empty" string. It looks like Cals behaves like merged cells A3 and A5 are "empty".

image description

Is there some way to fix this problem?

I can do this manually but it can be a big pain if table is huge:

a) Click on column A.

b) Click on "Merge and Center Cells" to unmerge the cells.

c) Manually copy text from C2 to C3 and C4 to C5.

P.S. There may be more then one cells merged it really depends how many customers belongs to particular country in the data I get from my coworkers.


edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-08-28 00:14:33.496617

2 Answers

Sort by » oldest newest most voted

answered 2015-12-12 14:38:57 +0200

JohnSUN gravatar image

updated 2015-12-13 10:40:26 +0200

Of course you can write special macro for this task... I'm usually do so

Convert merged cells and copy data from merged cells to ordinary cells.gif

Or we can set formula without function IF() - just =<cell above>. In this case, you need to set the option "Skip empty cells" (many thanks @pierre-yves samyn for this trick!)

Another way

edit flag offensive delete link more



@JohnSUN - Nice...

Just for fun, another solution with copy-paste & skip empty cells in this video (from 01:00). It is in French, but should be understandable...


pierre-yves samyn gravatar imagepierre-yves samyn ( 2015-12-12 18:14:45 +0200 )edit

@pierre-yves samyn Sorry, but I didn't see "this video is in French." But I think I understand what you're saying. The answer is supplemented with this embodiment

JohnSUN gravatar imageJohnSUN ( 2015-12-13 10:45:08 +0200 )edit

wot video? i see no videos.

Alex Kemp gravatar imageAlex Kemp ( 2015-12-13 13:08:16 +0200 )edit

Oups... here is the link to the video

pierre-yves samyn gravatar imagepierre-yves samyn ( 2015-12-13 14:03:25 +0200 )edit

Thanks for the link - I still thought that we are talking about this rarely used possibility of Paste Special

JohnSUN gravatar imageJohnSUN ( 2015-12-13 15:13:25 +0200 )edit

You can merge cells or rows or columns values easily using Dose for Excel Add-In:

king excel gravatar imageking excel ( 2018-10-29 00:30:18 +0200 )edit

answered 2015-12-10 11:47:48 +0200

Lupp gravatar image

updated 2015-12-12 18:12:59 +0200

strong text> Is there some way to fix this problem?

Yes. Do not merge cells.

Your sheet obviously is thought to keep data in a sense database tables do. Merging cells does not comply with the purpose.

It looks like A3 and A5 is empty.

A3 and A5 are empty, aren't they? Following your description you never entered something there. You may have a wrong understanding of "merging". The shown cell (topmost leftmost of the "merged range") occupies an increased area also covering the areas of the cells "merged in". Thus some logical cells get hidden. They still exist nonetheless in the sense that they can have any content, and they can be referenced. They even can have formats which will get reinstated after a split.

I virtually never merge cells, but if I did I expected exactly the behaviour described. In addition filters do not work with hidden cells, I think. If the software changed the behaviour with this respect, users sharing my expectations surely raised protest.

(Wherever using a table to keep data make sure that every set of data contains the complete information independent of a possible sort order. Databases never regard an order of the underlying data. They "sort on query" if demanded.)

Editing1: To countermand the merging of cells select a range containing the m,erged cells you want to "unmerge" and then going either

'Format' > 'Merge' > 'Split' or

Rightclick in the range to get the context menue > 'Split'

I did not configure a toolbar to show the 'Merge and Centre Cells' button, but you obviously have, and using it a second time on a range containing merged cells should also split them. (Working like a toggle button if applicable.)

Editing2: (Concerning the second part of the reworked question) See this attached example.

(Sorry! JohnSUN already answered everything. I will not delete this answer nonetheless.)

edit flag offensive delete link more


The problem is, I have written only a sample how to produce a problem. In my case I never do merge, I just get the document already produced in this way by my coworkers and customers and I need to do some analytics on it like filters etc.

My question is: Is there any simple way of transforming merged cells into unmerged cells AND copy all of the content from top most member to all unmerged cells after it.

froz gravatar imagefroz ( 2015-12-11 07:38:30 +0200 )edit

I do not know a short solution for the second part. It can be done in a few additional steps using a helper column, however. Maybe someone else hase a more "iconisable" idea. I am not an icon enthusiast.

Lupp gravatar imageLupp ( 2015-12-12 17:45:51 +0200 )edit

Question Tools

1 follower


Asked: 2015-12-10 09:58:49 +0200

Seen: 13,863 times

Last updated: Dec 13 '15