Sub B202_Add_New_Drop_Model() Dim sht As Worksheet Dim arr As Variant Dim brr As Variant Dim dic_Drop As New Dictionary Dim Drop_Row_Number As Long, i As Long, j As Long Dim str As Variant, key As Variant Dim tool_drop_Row Dim pointer

Set sht = Sheets("Drop型号确认")
Set dic_Drop = CreateObject("Scripting.dictionary")

Drop_Row_Number = sht.Range("B" & Rows.Count).End(xlUp).Row

On Error Resume Next

With sht
    For i = 2 To Drop_Row_Number
        dic_Drop(.Cells(i, 2) & .Cells(i, 3)) = 1
    Next
End With

Call A006_GRIP_Model_Source
Call A007_Tool_Drop_Dictionary

k = 0

For Each str In dic_GRIP.Keys
    If dic_GRIP(str)(1, 3) = "Drop" And Not dic_Drop.Exists(str) Then
        For Each key In dic_tool_drop.Keys
            If str Like "*" & key & "*" Then k = 1
        Next
        If k = 0 Then
            sht.Cells(Drop_Row_Number + 1, 2).Resize(1, 7) = dic_GRIP(str)
            Drop_Row_Number = Drop_Row_Number + 1
        End If
    End If
    k = 0
Next

sht.Range("A2:A" & Drop_Row_Number) = "=ROW()-1"

T = Timer - T
MsgBox T

End Sub

Sub B202添加新的Drop型号 T = Timer Dim sht As Worksheet Dim arr As Variant Dim brr As Variant Dim dic_Drop As New Dictionary Dim Drop表行号 As Long i As Long j As Long Dim str As Varian

原文地址: https://www.cveoy.top/t/topic/by0r 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录