excel - 在excel中随机值组合

标签 excel vba

我有一张表,在单元格 a 中有很多数据,在单元格 c 中的单元格 b 中只有 5 行。我想将这 5 个值与单元格 B 的数据 Randomly 结合起来。例如:

Cell A |  Cell B  |  Cell C  | Cell D 
======================================
data 1 |  this is | my photo  |this is our photo
data 2 | this is  |your photo |this is my photo     
data 3 | this is  | our photo |this is your photo
data 4 | this is  |           | this is my photo
data 5 | this is  |           | this is our photo

希望你能理解我的问题。谢谢

最佳答案

D1 进入:

=B1 & INDEX($C$1:$C$3,RANDBETWEEN(1,3))

并抄下来。例如:

enter image description here

关于excel - 在excel中随机值组合,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39426373/

相关文章:

基于 Python 的 vba 自动化?

arrays - 使用 Application.Match 数组 VBA 中最后一个元素的索引

excel - 通过 vlookup 检测空白单元格

c# - excel以编程方式获取范围

excel - 导入逗号分隔到特定工作表

c# - 错误 : Can't choose dates on a DatePicker that fall outside a floating VSTO Add-In

vba - MainFrame 应用程序中的 PageDown 键

excel - 拒绝进入取决于值(value)

Excel在单元格上添加注释

excel - 有没有一种方法可以在不使用VBA的情况下隐藏Excel中的行或列?