Dim dt1 As DataTable = DataTables("经历表") Dim dt2 As DataTable = DataTables("想要的效果表") dt2.DataRows.Clear Dim gls As List(Of String()) = dt1.GetValues("人员编号|项目名称|岗位信息_岗位") For Each ary As String() In gls Dim filter As String = "人员编号 = '" & ary(0) & "' and 项目名称 = '" & ary(1) & "' and 岗位信息_岗位 = '" & ary(2) & "'" Dim fdr As DataRow = dt1.Find(filter) Dim ndr As DataRow = dt2.AddNew ndr("人员编号") = fdr("人员编号") ndr("人员名称") = fdr("人员名称") ndr("项目名称") = fdr("项目名称") ndr("岗位_岗位") = fdr("岗位信息_岗位") ndr("岗位_专业") = fdr("岗位信息_专业") ndr("岗位_任职描述") = fdr("岗位信息_任职描述") ndr("开始年月") = dt1.Compute("min(开始年月)", filter) ndr("结束年月") = dt1.Compute("max(结束年月)", filter) Next