合并重复行并在 Excel sheet 中添加值

Combining duplicate rows and adding values in Excel sheet

大家好!我真的希望你能在以下方面提供帮助。我到处搜索,但现有的公式是为 2-3 列设计的,而且我还有更多。我也尝试过数据透视表,但不确定如何正确操作。我有以下列和行:

Brand   Style#  UPC          QOH  Price   Dim1_Name      Dim1   Description      Department
Adidas  AJ3858  889133106380  2   .00  Clothing Size  Small    SP LXE ZIP PANT  Bottoms
Adidas  AJ3858  889133106380  2   .00  Clothing Size  Small    SP LXE ZIP PANT  Bottoms
Adidas  AJ3858  889133106371  1   .00  Clothing Size  Medium  SP LXE ZIP PANT  Bottoms
Adidas  AJ3858  889133106371  3   .00  Clothing Size  Medium  SP LXE ZIP PANT  Bottoms
Adidas  AJ3858  889133106371  2   .00  Clothing Size  Medium  SP LXE ZIP PANT  Bottoms
Adidas  AJ3171  889133106365  2   .00  Clothing Size  Large   ZIP PANT         Bottoms
Adidas  AJ3171  889133106365  1   .00  Clothing Size  Large   ZIP PANT         Bottoms
Puma    RM-145  886148756658  1   .00  Clothing Size  Small   TEE              Tops
Puma    RM-145  886148756658  4   .00  Clothing Size  Small   TEE              Tops
Puma    RM-145  886148756658  0   .00  Clothing Size  Small   TEE              Tops
Puma    RM-145  886148756613  1   .00  Clothing Size  X-Large TEE              Tops
Puma    RM-145  886148756613  1   .00  Clothing Size  X-Large TEE              Tops

有些项目还有几列,例如 Dim2_Name 和 Dim2 Value,但我这样做只是为了给您一个想法。还有另一列包含商店名称,这就是所有重复条目的来源。我一直在寻找公式或方法来对 QOH 列求和,该列包含相同颜色或尺寸的重复项目的项目数量。像这样:

Brand   Style#  UPC          QOH  Price   Dim1_Name      Dim1   Description      Department
Adidas  AJ3858  889133106380  4   .00  Clothing Size  Small    SP LXE ZIP PANT  Bottoms
Adidas  AJ3858  889133106371  6   .00  Clothing Size  Medium  SP LXE ZIP PANT  Bottoms
Adidas  AJ3171  889133106365  3   .00  Clothing Size  Large   ZIP PANT         Bottoms
Puma    RM-145  886148756658  5   .00  Clothing Size  Small   TEE              Tops
Puma    RM-145  886148756613  2   .00  Clothing Size  X-Large TEE              Tops

列的位置可以是随机的,数据也可以排序。感谢您的时间和耐心等待!

这可以通过主元 table 完成,但 QOH 列需要位于最终输出的最右侧 table。

创建一个数据透视表 table,将品牌、样式、UPC、价格、Dim1_Name、维度 1、描述、部门拖到行区域。将 QOH 拖到“值”区域,默认情况下会对其求和。

在数据透视表 Table 工具的设计功能区中,将报表布局设置为 "Show in Tabular Form",然后再次设置为 "Repeat all Item Labels"。关闭小计和总计。

如果需要,您可以根据 QOH 总值更改排序顺序。