跳至主要内容

如何在Excel中生成唯一组合?

Author: Sun Last Modified: 2025-07-31

假设您有三个列表,现在您想从这三个列表中生成唯一组合作为下面的截图所示,那么您如何快速解决这个麻烦的问题呢?

A screenshot showing three lists in Excel from which unique combinations will be generatedArrowA screenshot showing the result of generating unique combinations from three lists in Excel

使用多个公式生成唯一组合

通过Kutools for Excel生成唯一组合good idea3


使用多个公式生成唯一组合

1. 在三个列表旁边选择一个空白列,例如D列,并在编辑栏中输入此公式 =MOD((ROW()-1),4)+1,然后按 Ctrl + Enter 键将此公式应用到整个列。请参见截图:

A screenshot showing the first formula being applied in Excel to generate unique combinations
Arrow
A screenshot showing the application of the first formula in generating unique combinations in Excel

2. 然后选择第一个公式列D旁边的整个E列,并在编辑栏中输入 =MOD(INT((ROW()-1)/4),4)+1,然后按 Ctrl + Enter 键应用该公式。请参见截图:

A screenshot showing the second formula being applied to generate unique combinations in Excel
Arrow
A screenshot showing the second formula applied in the column to generate unique combinations

3. 移动到第二个公式列E旁边的第三个新列F,并在编辑栏中输入此公式 =MOD(INT(INT((ROW()-1)/4)/4),4)+1,然后按 Ctrl + Enter 键将公式应用到整个列。请参见截图:

A screenshot showing the third formula applied in Excel to generate unique combinations
Arrow
A screenshot showing the third formula applied to generate unique combinations in Excel

4. 继续选择G列,并在编辑栏中输入此公式 =INDEX(A$1:A$4,D1),然后按 Ctrl + Enter 键获取结果。请参见截图:

提示:A1是第一个列表的第一个单元格,D1是包含第一个公式的列的第一个单元格。

A screenshot showing the INDEX formula applied in Excel to generate unique combinations
Arrow
A screenshot showing the result of the INDEX formula in generating unique combinations

5. 单击G1,然后向右拖动自动填充柄至I1,然后分别选择H列和I列以将公式应用到整个列。请参见截图:

A screenshot showing the step to click on G1 and drag the autofill handle right to I1 in Excel
Arrow
A screenshot showing the step to separately select column H and column I to apply the formula to the entire columns in Excel

然后您可以合并G列、H列和I列。

6. 选择J1,然后输入此公式 =G1&H1&I1,按 Enter 键,然后向下拖动自动填充柄直到出现重复项。请参见截图:

提示:G1、H1和I1是包含公式的单元格。

A screenshot showing the concatenation formula applied to generate final unique combinations
Arrow
A screenshot showing the final unique combinations generated from three lists in Excel

现在所有唯一组合都已由三个列表生成。

注意:在公式 =MOD((ROW()-1),4)+1=MOD(INT((ROW()-1)/4),4)+1 和 =MOD(INT(INT((ROW()-1)/4)/4),4)+1 中,4表示列表中有4个数据。


通过Kutools for Excel生成唯一组合

使用上述方法,对于用户来说太复杂和麻烦了,幸运的是,Kutools for Excel列出所有组合功能可以快速通过三个列表生成唯一的可能组合。

Kutools for Excel 提供了超过 300 种高级功能,简化复杂任务,提升创造力与效率。 通过集成 AI 能力,Kutools 能够精准自动执行任务,让数据管理变得轻松简单。Kutools for Excel 的详细信息...         免费试用...

1. 单击 Kutools > 插入 > 列出所有组合。请参见截图:

A screenshot of the List All Combinations option under the Kutools tab in Excel

2. 然后在 “列出所有组合”对话框中,从 “类型”下拉列表中选择“值”,单击“浏览”按钮选择第一个列表,并单击“添加”将其添加到组合列表中。请参见截图:

A screenshot of the List All Combinations dialog

重复此操作以将所有列表依次添加到组合列表部分。请参见截图:

A screenshot showing all lists added to the Combinations List

3. 单击确定,并在弹出的对话框中选择目标范围的第一个单元格以输出组合。请参见截图:

A screenshot showing the dialog for selecting a destination range for the unique combinations

4. 单击确定,所有唯一组合已经生成。

A screenshot showing the final output of unique combinations in Excel

Kutools for Excel - 通过超过300个必备工具,让Excel功能大幅提升。永久免费享受AI功能!立即获取

演示:在Excel中列出所有可能的唯一组合

Kutools for Excel:超过 300 种实用工具触手可及!永久免费享受 AI 功能!立即下载!

相关文章:

最佳 Office 办公效率工具

🤖 Kutools AI 助手:基于智能执行,彻底革新数据分析 生成代码创建自定义公式分析数据并生成图表调用 Kutools Functions
热门功能:查找、选中项的背景色或标记重复项|删除空行|合并列或单元格且不丢失数据|四舍五入(无公式)...
高级 LOOKUP多条件查找 (VLookup)多值查找 (VLookup)多表查找 (VLookup Across Multiple Sheets)模糊查找 (Fuzzy Lookup)...
高级下拉列表快速创建下拉列表依赖型下拉列表多选下拉列表...
列管理器添加指定数量的列移动列切换隐藏列的可见状态比较区域及列...
特色功能网格聚焦设计视图增强编辑栏工作簿 & 工作表管理器资源库(自动文本)|日期提取合并数据加密/解密单元格按列表发送电子邮件超级筛选特殊筛选(筛选粗体/倾斜/删除线等)...
热门15 大工具集12 款文本工具添加文本删除特定字符等)50+ 种图表 类型甘特图等)40+ 实用公式基于生日计算年龄等)19 款插入工具插入二维码按路径插入图片等)12 种转换工具小写金额转大写汇率转换等)7 款合并与分割工具高级合并行分割单元格等)...更多精彩等你发现
使用 Kutools,支持您的首选语言——包括英语、西班牙语、德语、法语、中文及40 多种其他语言!

用 Kutools for Excel 加速你的 Excel 技能,体验前所未有的高效办公。 Kutools for Excel 提供300 多项高级功能,助您提升效率,节省大量时间。点击此处,获取你最需要的功能...


Office Tab 为 Office 带来标签式界面,让你的工作更加轻松

  • 在 Word、Excel、PowerPoint 启用标签式编辑和阅读
  • 在同一窗口的新标签中打开和创建多个文档,无需新建窗口。
  • 办公效率提升50%,每天帮你减少上百次鼠标点击!