Option Explicit
Sub TEST()
Dim Brr, i&, j%, T$, SP
Brr = Range([A1], [A65536].End(3))
[A:A].Interior.ColorIndex = xlNone
T = "," & [A1] & ","
For i = 3 To UBound(Brr)
SP = Split(Brr(i, 1) & ",", ",")
For j = 0 To UBound(SP)
If SP(j) = "" Or InStr(T, "," & Val(SP(j)) & ",") = 0 Then GoTo j01
Cells(i, 1).Interior.ColorIndex = 38: Exit For
j01: Next
Next
End Sub作者: Qektyyrwp 時間: 2024-1-13 00:26
Option Explicit
Sub TEST()
Dim Brr, i&, j%, T$, SP
Set Brr = Range([G1], [G65536].End(3))
Brr.Offset(4).Interior.ColorIndex = xlNone: Brr = Brr
T = "," & [F3] & ","
For i = 5 To UBound(Brr)
SP = Split(Brr(i, 1) & ",", ",")
For j = 0 To UBound(SP)
If SP(j) = "" Or InStr(T, "," & Val(SP(j)) & ",") = 0 Then GoTo j01
Cells(i, 1).Interior.ColorIndex = 38: Exit For
j01: Next
Next
End Sub作者: Qektyyrwp 時間: 2024-1-13 09:51