|
参与一下。。。
- Sub ykcbf() '//2024.5.31
- Application.ScreenUpdating = False
- Set d = CreateObject("Scripting.Dictionary")
- b = [{"c3","e3","g3","c4","e4","g4","c6","e6","g6","c7","e7","g7"}]
- With Sheets("数据库")
- r1 = .Cells(Rows.Count, 1).End(3).Row
- arr = .[a1].Resize(r1, 13)
- For i = 2 To UBound(arr)
- s = arr(i, 2)
- d(s) = i
- Next
- s = Sheets("修改录入").[c3].Value
- If d.exists(s) Then
- r = d(s)
- Else
- r = r1 + 1
- .Cells(r, 1) = r1
- End If
- For x = 1 To UBound(b)
- .Cells(r, x + 1) = Sheets("修改录入").Range(b(x)).Value
- Next
- End With
- Set d = Nothing
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
|