For Each r As Row In Tables("表B").Rows If r.IsNull("第一列") = False AndAlso r.IsNull("第二列") = False AndAlso r("第一列") = Tables("表A").Rows(r.Index)("第一列") AndAlso r("第二列") = Tables("表A").Rows(r.Index)("第二列") Then r("第三列") = "OK" Else r("第三列") = Nothing End If Next