|
楼主 |
发表于 2023-3-16 21:08
|
显示全部楼层
- Sub lqxs()
- Dim Arr, i&, x$, y$, d1
- Dim d, k, t, n%
- Set d = CreateObject("Scripting.Dictionary")
- Set d1 = CreateObject("Scripting.Dictionary")
- Sheet1.Activate
- [j5:j5000].ClearContents
- Arr = [a4].CurrentRegion
- For i = 5 To UBound(Arr)
- x = Arr(i, 7) & "|" & Arr(i, 8)
- y = Arr(i, 7) & "|" & Arr(i, 9)
- If Arr(i, 7) <> "" And Arr(i, 8) <> "" Then d(x) = i '+ 3
- If Arr(i, 7) <> "" And Arr(i, 9) <> "" Then d1(y) = i ' + 3
- Next
- k = d.keys: t = d.items
- For i = 0 To UBound(k)
- If d1.exists(k(i)) Then
- n = d1(k(i))
- Cells(n, 10) = "赎回款"
- Cells(t(i), 10) = "已回款"
- Else
- Cells(t(i), 10) = "理财中"
- End If
- Next
- kk = d1.keys: tt = d1.items
- For i = 0 To UBound(kk)
- If d.exists(kk(i)) Then
- nn = d1(kk(i))
- Cells(nn, 10) = "赎回款"
- Else
- Cells(tt(i), 10) = "没有这笔赎回款"
- End If
- Next
- End Sub
复制代码
老师改了是可以实现,能不能帮忙代码整合下,谢谢老师 |
|