DataTables("统计表2").DataCols.Add("排序编号", Gettype(String))' 增加临时列排序编号 For Each dr As Row In Tables("统计表2").Rows Dim dr2 As DataRow dr2 = DataTables("项目明细").Find("[项目简称] = '" & dr("项目简称") & "'") If dr2 IsNot Nothing Then dr("排序编号") = dr2("简称代码") End If Next