For Each r As Row In Tables("表A").Rows Dim dr As DataRow = DataTables("表A").Find("货号 = '" & r("货号") & "' and 货描 is not null") If dr IsNot Nothing Then r("货描")=dr("货描") End If Next
或者
Tables("表A").sort = "货号,货描 desc" Dim pr As Row = Nothing For Each r As Row In Tables("表A").Rows If pr IsNot Nothing Then If pr("货号") = r("货号") Then r("货描")=pr("货描") End If End If pr = r Next