For i1 As Integer = 0 To Tables("设备库存明细").Rows.Count - 1 For i2 As Integer = 0 To Tables("续费表").Rows.Count - 1 If Tables("续费表").Rows(i2)("备注") = "到期未续费不在免费更换周期内,日后更换算新装" AndAlso Tables("续费表").Rows(i2)("设备ID号") = Tables("设备库存明细").Rows(i1)("设备ID号") Then Tables("续费表").Rows(i2)("备注") = Tables("设备库存明细").Rows(i1)("备注") Else Continue For End If Next Next