首页 >> 玩机圈社区 > 精选知识 >

excel抽签(excel抽签)

2022-12-31 17:37:39 来源: 用户: 

您好,现在柳柳来为大家解答以上的问题。excel抽签,excel抽签相信很多小伙伴还不知道,现在让我们一起来看看吧!

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、请点一下图片)。

本文就为大家分享到这里,希望小伙伴们会喜欢。

  免责声明:本文由用户上传,与本网站立场无关。财经信息仅供读者参考,并不构成投资建议。投资者据此操作,风险自担。 如有侵权请联系删除!

 
分享:
最新文章
站长推荐