汗。。。忘记贴代码了。 Private Sub CommandButton1_Click() Dim ArrYS, ArrTJ, ArrJG, arrTemp Dim i&, j&, k&, strTemp$, blnBZ As Boolean ArrYS = Range("D3:Q202") ArrTJ = Range("T2:IV2") Application.ScreenUpdating = False Range("T3:IV202").ClearContents ArrJG = Range("T3:IV202") For i = 1 To UBound(ArrJG, 1) strTemp = Join(WorksheetFunction.Index(ArrYS, i, 0), "-") For j = 1 To UBound(ArrJG, 2) If Len(ArrTJ(1, j)) > 0 Then blnBZ = True arrTemp = Split(ArrTJ(1, j), "-") For k = 0 To UBound(arrTemp) If InStr(1, strTemp, arrTemp(k), vbTextCompare) = 0 Then blnBZ = False Exit For End If Next If blnBZ Then ArrJG(i, j) = "●" End If Next j Next i Range("T3:IV202") = ArrJG Application.ScreenUpdating = TrueEnd Sub
使用道具 举报
amulee老师我看测试过代码了,这个结果不对,看附件
改过了。刚才欠考虑了。
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )
GMT+8, 2024-5-16 17:01 , Processed in 0.419687 second(s), 12 queries , Gzip On, Yac On.
Powered by Discuz! X3.4
Copyright © 2001-2020, Tencent Cloud.