以下是引用东方智彩在2010-1-18 14:01:00的发言: 哈哈老师刚测试过还是不对呀,只要T2-IV2中的单元格中有的数据查找,只管几个数值只要不同在就显示为空,只有同在的数值才显为●,还要辛苦老师! 汗。。。忘记贴代码了。 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 = True End
Sub |