|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub qs()
- With Sheet1
- arr = .Range("a3:c" & .Cells(Rows.Count, 1).End(xlUp).Row)
- ReDim brr(1 To UBound(arr), 1 To 1)
- For i = 1 To UBound(arr)
- If Len(arr(i, 2)) > 0 Then
- For j = 1 To UBound(arr)
- If Len(arr(j, 3)) > 0 Then
- If brr(j, 1) <> "成对" Then
- If arr(i, 1) & arr(i, 2) = arr(j, 1) & arr(j, 3) Then
- brr(i, 1) = "成对": brr(j, 1) = "成对"
- Exit For
- Else
- brr(i, 1) = "单看"
- End If
- End If
- End If
- Next j
- End If
- Next i
- For i = 1 To UBound(brr)
- If brr(i, 1) = "" Then brr(i, 1) = "单看"
- Next
- .Range("f3").Resize(UBound(brr), 1) = brr
- End With
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|