excel抽签不重复_excel抽签

2023-07-04 18:10:28 来源:互联网


(相关资料图)

1、用VBA代码(我设置的抽签1-100,不会有重复),如下:Sub cq()Range("c3:e3").ClearContentsDim i As Bytei = 3T1:Do While i < 6 If Cells(3, i) = "" Then Cells(3, i) = Application.RandBetween(1, 100) End If i = i + 1LoopIf Application.Or(Cells(3, 3) = Cells(3, 4), Cells(3, 3) = Cells(3, 5), Cells(3, 4) = Cells(3, 5)) Then Range("c3:e3").ClearContents GoTo T1End IfEnd Sub效果如下(若图片没有动画。

2、请点一下图片)。

本文到此分享完毕,希望对大家有所帮助。

关键词:
x 广告
x 广告

Copyright   2015-2022 财富赢家网版权所有  联系邮箱:920 891 263@qq.com

京ICP备2022016840号-48