|
本帖最后由 ynzsvt 于 2024-9-15 18:07 编辑
- Sub test()
- Dim Arr, Brr, x&
- Dim rng As Range
- Dim Dic
- Set Dic = CreateObject("scripting.dictionary")
- Brr = Sheet2.[A1].CurrentRegion
- Arr = Sheet1.[A1].CurrentRegion
- For x = 1 To UBound(Arr)
- If Len(Arr(x, 1)) Then
- Dic(Arr(x, 1)) = ""
- End If
- Next
- For x = 2 To UBound(Brr)
- If Dic.exists(Brr(x, 1)) Then
- Brr(x, 2) = "已存在"
- Else
- Brr(x, 2) = "第一次"
- Dic(Brr(x, 1)) = ""
- End If
- Next
- Sheet1.[A1].Resize(Dic.Count) = Application.WorksheetFunction.Transpose(Dic.keys)
- Sheet2.[A1].CurrentRegion = Brr
- End Sub
复制代码
waw751115 发表于 2024-9-15 17:00
请问怎样送鲜花啊
点右下角的评分。 |
评分
-
1
查看全部评分
-
|