Dim t As Table = Tables("冲压车间工资表") For i As Integer = 1 To t.rows.count-1 Dim pr As Row = t.Rows(i-1) Dim cr As Row = t.Rows(i) If pr("生产形式") <> "个人" Then If pr("日期") = cr("日期") AndAlso pr("生产形式") = cr("生产形式") Then cr("产品名称") = pr("产品名称") End If End If Next