For i1 As Integer = 0 To Tables("表A").Rows.Count - 1 For i2 As Integer = 0 To Tables("表B").Rows.Count - 1 If Tables("表B").Rows(i2)("物料号") = Tables("表A").Rows(i1)("物料号") Then Tables("表B").Rows(i2)("价格") = Tables("表A").Rows(i1)("价格") Else Continue For End If Next Next