按钮提示值的一个新的唯一的行组合 [英] Button for suggesting a new unique row combination of values

查看:130
本文介绍了按钮提示值的一个新的唯一的行组合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以说我们有如下表:

    A   B   C
1 | x | X | X |
2 | y | X | X |
3 |   |   |   |

In cells A1-A3 we have a dropdown list with 2 options: [x,y]
In cells B1-B3 we have a dropdown list with 2 options: [x,y]
In cells C1-C3 we have a dropdown list with 2 options: [x,y]

是否有可能创建一个按钮,显示给用户,这是不是已经在previous行提交了新的组合?

Is it possible to create a button that suggests to the user a new combination that it wasn't already submitted on the previous rows ?

例如它会建议在第3行,他可以选择下列任何的:YYY / YYX / XYX /等等。甚至挑任何可行的建议,并显示它(只有一个)

For example it would suggest that on row 3, he can select any of the following: "yyy/yyx/xyx/ etc.." or even to pick any of the possible suggestions and display it (just one)

推荐答案

当然。但随着VBA。在VBA可以像下面这样:

Sure. But with VBA. The VBA can look like the following:


  1. 生成与行的所有可能的排列列表或数组。

  2. 请一个遍历所有行循环,消除置换,如果你的行
  3. 它发生
  4. 显示在使用了MsgBox,其中排列是用

我们不能写code你,但我们可以帮你找到答案。

We can't write the code for you but we can help you find the answers.

链接帮助你开始:


  1. 置换: http://www.excelcasinogames.com /excel-vba-permutation-macro-$c$c.html

  2. 集合(在谷歌的第一个随机链接): http://maffelu.net/using-藏品在VBA /

  3. For循环: http://msdn.microsoft.com/en-us /library/5z06z1kb.aspx

  1. Permutations: http://www.excelcasinogames.com/excel-vba-permutation-macro-code.html
  2. Collections (first random link in Google): http://maffelu.net/using-collections-in-vba/
  3. For loops: http://msdn.microsoft.com/en-us/library/5z06z1kb.aspx

这篇关于按钮提示值的一个新的唯一的行组合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆