在Excel VBA中创建组合 [英] Create combinations in Excel VBA
本文介绍了在Excel VBA中创建组合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对整个网站进行了搜索,试图寻找一个宏(或函数),该宏将根据相邻列中的给定列表创建唯一的组合.
I've scoured the entire website trying to look for a macro (or function) that will create unique combinations from a given list in adjacent columns.
所以基本上,我有:
A 1 F1 R1
B 2 F2
C F3
D
E
我正在尝试将所有信息列出为(在同一工作表中,在不同的列中):
And I'm trying to list all the information as (in the same worksheet and in different columns):
A 1 F1 R1
A 1 F2 R1
A 1 F3 R1
A 2 F1 R1
A 2 F2 R1
A 2 F3 R1
B 1 F1 R1
B 1 F2 R1
B 1 F3 R1
B 2 F1 R1
B 2 F2 R1
B 2 F3 R1
...etc.
(由于能够切换工作表在纸张上的打印位置而增加了奖励)
(added bonus for being able to toggle where the list is printed on the sheet)
推荐答案
在 https://上有一个工作簿app.box.com/s/47b28f19d794b25511be 以及基于公式和基于VBA的方法.
There's a workbook at https://app.box.com/s/47b28f19d794b25511be with both formula- and VBA-based methods to do that.
这篇关于在Excel VBA中创建组合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文