Dim flag As Boolean = False
For Each dr As DataRow In DataTables("数据库1").datarows
Dim val As String = dr("B列")
Dim drr As DataRow = Nothing
If val > "" Then
drr = DataTables("数据库1").find("A列='" & val.SubString(0,2) & "'")
End If
If drr IsNot Nothing Then
dr("重复标记")="有重复"
flag = True
Else
dr("重复标记")= Nothing
End If
Next