在电子表格中,是否可以将行分为几组,这些组在过滤后不会改变顺序?

我试图在电子表格行中创建行子组,以便我可以对数据进行排序,但任何特定子组中的行都保持在一起。这可能是最容易用图片显示的内容。

按列数据对子组内的行进行排序

在此处输入图片说明

理想情况下,我想找到一种在Google电子表格中执行此操作的方法,但我敢打赌这是不可能的,因此欢迎使用任何类型的电子表格程序的解决方案。

雷查德博士

好的,在Google电子表格中:

  1. 我创建了一个初始电子表格,看起来应该像这样(具有一些艺术上的自由)。下半部分尚未排序,因此等于上半部分:

    表格-未排序

  2. Select the three columns that make the Category 1, then go to Data > Sort range.

    排序范围

  3. From there, just change the preset column (should be A) to C (aka, the 2nd criteria).

    排序范围对话框

  4. This part of the table is now sorted according to the 2nd criteria. Just repeat to the 2nd category.

    最终结果

  5. The end result should be your table.

UPDATE:

Based on @beroe suggestion, I was able to make up a little more.

First of, you need to add an extra column, that assigns Individual Categories to each of the items. Although this is feasible with your current data setup, I find it is the Right Thing To Do to have a table such as the following:

表格-未排序的数据

Note that I haven't yet sorted the data according to your 2nd criteria. Note also that next to the 2nd criteria is now a column that contains each item's respective Category.

Select all data, then go to Data > Sort Range. In there Sort first by column D (the column with the Categories), after press add another sort column, and then add the column corresponding to the 2nd criteria (column C).

Why this works is because of an idea spreadsheet software has about precedence. As it is, Google will try to sort first by the column D. Afterwards, it will sort all remaining data by column C. All remaining data is already sorted.

Note that the order by which I placed the columns is this, due to the reason pointed before. If you tried to place Column C then column D, you wouldn't have your desired outcome.

排序范围-多列

The end result is something like this:

最终结果

Ultimately, adding a column with the item's information is a good spreadsheet design decision (if there is something like this in existence).

最后一点,似乎Google Spreadsheet默认具有JavaScript功能(即,等同于Excel的Macros)。可以通过访问它Tools > Script Editor但是,我不知道如何编写JavaScript。最终,如果您需要更复杂的方法,则可以诉诸于此。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

是否可以基于Excel 2007中的列将电子表格拆分为多个文件?

是否可以从电子表格生成嵌套的JSON?

批准导入范围后,是否可以浏览电子表格?

OpenXML PowerTools:是否可以将 Excel 电子表格写入 .Net MemoryStream?

如何基于Libreoffice电子表格中的一组重新排列行?

电子表格中是否&匹配功能

电子表格中是否有Infinity?

是否可以在电子表格中复制和粘贴数据透视表?

是否可以从多个Google电子表格中创建一个pdf文件?

Google Meet startTimeCode使用,是否可以在电子表格单元格中查找?

Excel-根据电子表格“ B”中的信息过滤电子表格“ A”

自动创建电子表格后,如何将电子表格的 URL 引用复制到其他 Google 电子表格中的跟踪表

抽取电子表格中的行

如何从Google电子表格中删除行?

将列转置为电子表格中的行

Python脚本没有将整个行放在Excel电子表格中

将Excel电子表格导出为XML,并在导出过程中或导出后按字母顺序对数组进行排序?

将过滤后的数据从表格小部件 Google AppMaker 导出到电子表格

在Google电子表格中将值从TRUE更改为FALSE后,是否可以停止COUNTIF函数?

在 Google Sheets API 中应用过滤器后如何获取电子表格的范围?

如何将包含数据的行始终保留在电子表格的顶部而不进行过滤

根据日期列将Excel电子表格拆分为单独的文件

用于从多个不同电子表格中编译数据的 Google 脚本,这些电子表格是同一文件的副本

是否可以将条件验证规则用作 Google 电子表格验证框中的自定义公式?

是否可以将编辑器的用户名写入Google文档电子表格中的单元格

是否可以在for(var in range)中向i添加偏移量以将连续的e.parameters发布到唯一的电子表格单元格?

将基本过滤器应用于电子表格列中的多个值

是否可以使用 Excel 中的用户表单禁用在电子表格中添加空行?

将表单数据写入电子表格后如何更新 HTML 表格?