随机选择一个细胞 [英] Have randomly select a cell

查看:118
本文介绍了随机选择一个细胞的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我需要一个程序的帮助:

我需要它:

从一系列单元格中随机选择一个单元格并将该单元格复制到另一个单元格中表格

然后在原始表格中加粗选择。

使用It语句说:

如果是粗体,请选择一个新的,

如果不是粗体,选择它,然后加粗。



我希望这是有道理的。



我们的目标是从100个列表中选择5个名字,然后在使用所有名称之前不再使用它。



我尝试过的事情:



我试过索引,但我输了。

解决方案

开始录制宏。

执行执行这些操作所需的步骤。

停止录制。

编辑你可以看看如何做到这一点。



要获得随机值,请使用一些基于当前时间的计算作为一系列单元格的索引。


检查我的过去的答案:从文本文件中读取,选择随机词 [ ^ ]

在那里你会找到一种方法来使用 Rnd 功能

So I am needing help with a program:
I need it to:
Randomly select a cell out of a range of cells and copy that cell into a different sheet
Then have it bold the selection in the originally sheet.
With an It statement that says:
If bold, pick a new one,
if not bold, select it, and then bold it.

I hope that makes sense.

The goal is to have 5 names picked from a list of 100, then have it not use it again until all names have been used.

What I have tried:

I have tried Index but I am lost.

解决方案

Start a macro recording.
Execute the steps needed to perform theses actions.
Stop the recording.
Edit you macro to see how to do it.

To get random values use some calculation based on the current time as an index into a range of cells.


Check my past answer: Read from text file, select random word[^]
There you'll find a way to use Rnd function.


这篇关于随机选择一个细胞的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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