排序包含合并单元格的Excel表 [英] Sorting an Excel Table that contains Merged Cells
问题描述
我有一个相当简单的Excel文件,主要是布局(这是我写的报告),但是在文档的中间(第28行),我有一个包含合并单元格的表.
I have a fairly simple Excel file, mostly layout (it's a report I've written), but midway down the document (row 28), I have a table that contains merged cells.
即A | B | D | E | F
i.e. A | B | D | E | F
如下:
A | BCD | E | F
A | BCD | E | F
对其下面包含数据的三行进行相同的操作,如下所示:
the same is done on the three rows below it, which contain the data, as follows:
单元格B28:D28被合并
Cell B28:D28 is merged
单元格B29:D29被合并
Cell B29:D29 is merged
单元格B30:D30被合并
Cell B30:D30 is merged
单元格B31:D31被合并
Cell B31:D31 is merged
当我选择范围A28:F31时,无法按任何列排序,错误如下:
When I select range A28:F31 I cannot sort by any column, error as follows:
此操作要求合并的单元格具有相同的大小"
"this operation requires merged cells to be identically sized"
Microsoft的回应只是我需要确保我的单元格已合并.
Microsoft's response is simply that I need to make sure my cells are merged.
http://support.microsoft.com/kb/813974
有什么建议吗?除了合并单元格以外?我知道可以对单元格进行跨中心选择",但是出于本报告的目的,我必须使用合并的单元格.
Any advice? Other than unmerging cells? I am aware that I can Center Across Selection for cells, but for the purposes of this report, I am required to use merged cells.
推荐答案
您不能仅将合并的单元格和粘贴为值"复制到单个单元格中吗?更直接地,为什么您必须在此报表上使用合并的单元格?我个人无法想到我曾经做过的任何报告,都不能以几种不同的方式重做.
You can't just copy the merged cell and "Paste as value" into a single cell? More directly, WHY do you have to used merged cells on this report? I personally can't think of any report that I've ever made that just COULD NOT be redone in a few different ways.
如果您可以尽可能多地告诉我们有关报告的布局(字段,数据类型)的信息,或者只是张贴屏幕截图,则对您很有帮助.
If you can tell us, as much as possible, about the layout of the report (Fields, Datatypes) or just post a screenshot it would help alot.
除非有人拥有我从未见过的东西,否则除了将整个表复制到VBA中的数组并使用排序算法之外,您将必须找到一种方法来合并这几个单元格.
Unless someone has something I've never seen before, Short of copying your entire table to an array in VBA and using a sorting algorithm, you're going to have to find a way around having those few cells merged.
再次,给出一个布局示例,我们将从那里开始.
Again, Give an example as a layout and we'll go from there.
这篇关于排序包含合并单元格的Excel表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!