DataTables("取前两名").DataRows.Clear For Each s As String In DataTables("表A").GetValues("关联方") For i As Integer = 0 To 1 Dim fdr As DataRow = DataTables("表A").Find("关联方='" & s & "'","金额 desc",i) Dim dr As DataRow = DataTables("取前两名").AddNew dr("编号") = fdr("编号") dr("单位") = fdr("单位") dr("关联方") = fdr("关联方") dr("金额") = fdr("金额") Next Next