1 Sub 宏222() 2 Dim x% 3 Dim y% 4 For x = 1 To 4000 Step 1 5 If Sheet1.Cells(x, 2) <> "" Then 6 7 For y = 1 To 4000 Step 1 8 If Sheet2.Cells(y, 2) <> "" Then 9 10 If Sheet2.Cells(y, 2) = Sheet1.Cells(x, 2) And Format(Sheet1.Cells(y, 9), "mm/dd hh:mm") = Format(Sheet2.Cells(x, 5), "mm/dd hh:mm") Then 11 12 Sheet3.Cells(x, 1) = "OK-M" 13 Next 14 Exit For 15 16 Else 17 18 Sheet3.Cells(x, 1) = "NO-M" 19 20 21 End If 22 23 End If 24 25 Next 26 27 End If 28 29 Next
30 31 End Sub
问题已解决