For Each dc As DataCol in DataTables("zszy").DataCols For Each dr As DataRow in DataTables("zstb").DataRows Dim drr As DataRow = DataTables("zszy").Find(dc.name & " = '" & dr(dc.name) & "'") If drr Is Nothing Then dr(dc.name) = "志愿错误" '无drr行在当前行列内标出"志愿错误" End If Next Next