Dim b As New GroupTableBuilder("统计表1",DataTables("订单A")) b.Groups.AddDef("产品") b.Totals.AddDef("数量") b.Build MainTable = Tables("统计表1") For Each r As Row In Tables("统计表1").Rows If r("数量") <= 10000 Then r("数量") = Nothing ElseIf r("数量")> 10000 Then r("数量")= r("数量")-10000 End If Next DataTables("统计表1").RemoveFor("数量 is null")