![根据两列将 Excel 工作表拆分为多个工作表](https://linux22.com/image/1535434/%E6%A0%B9%E6%8D%AE%E4%B8%A4%E5%88%97%E5%B0%86%20Excel%20%E5%B7%A5%E4%BD%9C%E8%A1%A8%E6%8B%86%E5%88%86%E4%B8%BA%E5%A4%9A%E4%B8%AA%E5%B7%A5%E4%BD%9C%E8%A1%A8.png)
我有一张 10000 行 x 50 列的表格。该表格全部在一张工作表中,我计划根据两列(具体来说分别是第 5 列和第 1 列)中的值将该工作表拆分为多个工作表。
编辑:澄清一下,我在这里尝试做的是根据第 5 列拆分数据,然后根据第 1 列将结果表拆分为进一步的工作表。
我发现了一些 VBA 代码,它能够根据第一列中的值将数据拆分到多个工作表中这里。
我的问题是:是否可以修改该脚本,以便根据列号 5 将数据拆分到工作表中,然后应用另一个级别一次性根据列 1 进行拆分?还是我需要逐一应用这两个步骤的脚本?
这是一些 CSV 格式的供您测试使用的播放数据。
Dummy 1,Dummy 2,Dummy 3,Dummy 4,Dummy 5,Dummy 6,Dummy 7,Dummy 8
Class 1,0.6,0.4,0.4,A,0.1,0.6,0.2
Class 2,0.4,0.1,0.2,A,0.8,0.3,0.5
Class 3,0.2,0.9,0.9,B,0.8,0.3,0.9
Class 1,0.4,0.6,0.5,B,0.8,0.9,0.8
Class 3,0.5,0.3,0.3,A,0.5,0.1,0.4
Class 2,0.4,0.2,0.0,A,0.7,0.3,0.2
Class 1,0.4,0.2,0.4,A,0.4,0.9,0.9
Class 4,0.1,0.3,0.8,A,0.5,0.3,0.5
Class 1,0.5,0.3,0.1,B,0.3,0.2,0.2
Class 2,0.4,0.5,0.6,B,0.1,0.3,0.2
Class 3,0.4,0.8,0.3,B,0.4,0.2,0.5
Class 1,0.5,0.1,0.9,B,0.5,0.6,0.6
Class 3,0.7,0.1,0.9,C,0.0,0.9,0.8
Class 2,0.1,0.2,0.5,C,0.0,0.1,0.7
Class 1,0.4,0.5,0.4,C,0.0,0.4,0.2
Class 4,0.7,0.4,0.1,C,0.9,0.1,0.9
Class 1,0.5,0.5,0.0,B,0.5,0.2,0.1
Class 2,0.5,0.8,0.6,B,0.6,0.6,0.9
Class 3,0.7,0.8,0.6,B,0.4,0.2,0.0
Class 1,0.6,0.2,0.6,A,0.6,1.0,1.0
Class 3,0.6,1.0,0.1,A,0.7,0.9,0.5
Class 2,0.4,0.7,0.7,C,0.5,0.7,0.2
Class 1,0.2,0.8,0.3,C,0.1,0.6,0.4
Class 4,0.5,0.1,0.0,D,0.9,0.1,0.5
Class 1,0.4,0.0,1.0,D,0.7,0.0,1.0
Class 2,0.8,0.5,0.4,B,0.0,0.2,0.6
Class 3,0.4,0.5,0.7,A,0.1,0.0,0.0
Class 1,1.0,0.3,0.6,C,0.1,0.4,0.8
Class 3,0.1,1.0,0.0,D,0.5,0.9,0.1
Class 2,0.7,0.3,0.7,B,0.1,0.9,0.4
我很抱歉提出这个问题,但我对 Excel VBA 还不熟悉,仍处于学习阶段。非常感谢。