首页 > 代码库 > VBA

VBA

Sub Macro1()                 For d = 1 To 9         For e = 2 To 70         For c = 1 To 225            If InStr(Worksheets(2).Cells(d, e), Worksheets(3).Cells(c, 1)) > 0 Then            Worksheets(2).Cells(12 + d, 2) = Worksheets(2).Cells(12 + d, 2) & "," & Worksheets(3).Cells(c, 1)            End If                       If InStr(Worksheets(2).Cells(d, e), Worksheets(4).Cells(c, 1)) > 0 Then             Worksheets(2).Cells(23 + d, 2) = Worksheets(2).Cells(23 + d, 2) & "," & Worksheets(4).Cells(c, 1)            End If         Next                 Next                 Next

End Sub

VBA