sorting a range with merged cells

Wil Moosa

Well-known Member
Joined
Aug 11, 2002
Messages
882
I try to sort a range of cells. Unfortunately a few columns are merged cells. When I try to sort the rows in alphabetical order I get an error message saying "When sorting the range all merged cells need to be of the same size.

Within the range all the merged cells áre of the same width. some of the cells outside the range aren't but that can not cause the problem... can it?

I do not fully understand what the problem is here and is there a way to overcome this?
 

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

Instead of using the MERGED CELL option, use FORMAT --> CELLS --> ALIGNMENT --> and in the Horizontal select CENTRE ACROSS SELECTION.
I know this is a long work round to the problem but I can't find another way of doing it, I have had to do this on several occasions.

e.g. MERGE CELLS A1:C1

What I think the program is doing is taking the MERGED CELL as one cell, if you go into it it will say A1, if you scroll right it will go into D1.
However, using the CENTRE ACROSS SELECTION if you go to cell A1 and scroll right you will be in B1.
 

kmjones

New Member
Joined
Jun 15, 2005
Messages
44
I tried that. It didnt center it like a merged cell. It is centered in the one cell. But not like vertically. My cells are like 5 rows merged. Also, if I take out the merged cells, how would you sort that column but keep the rest of the information in the columns next to it to sort with it?
 

Mark W.

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,654
kmjones said:
I tried that. It didnt center it like a merged cell. It is centered in the one cell. But not like vertically. My cells are like 5 rows merged. Also, if I take out the merged cells, how would you sort that column but keep the rest of the information in the columns next to it to sort with it?

First, select the entier range that you'd like to sort.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,491
Messages
5,596,462
Members
414,069
Latest member
StudExcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top