如何合并包含数字和文本的重复数据

How to consolidate duplicate data with both numbers and text

大家下午好

我正在尝试合并一个充满重复值的 table,我发现 "consolidate" 功能非常适合这个,但是,我偶然发现的问题是它赢了'合并后保留 "material" 文本。

这是原始数据:

Part Number Quantity    Material
02210144US  3   22ga Galvanized
02210144US  3   22ga Galvanized
02210144US  3   22ga Galvanized
02210144US  2   22ga Galvanized
02210144US  2   22ga Galvanized
02210144US  2   22ga Galvanized
02332256US  2   26ga Galvanized
02332256US  2   26ga Galvanized
21010601    1   18ga Galvaneal
21010601    1   18ga Galvaneal
21073101    1   26ga Galvanized
21073101    1   26ga Galvanized
21073102    1   26ga Galvanized
21073103    1   26ga Galvanized
21073103    1   26ga Galvanized
21073103    1   26ga Galvanized
21073111    1   26ga Galvanized
21073111    1   26ga Galvanized
21073112    1   26ga Galvanized
21073113    1   26ga Galvanized
21073113    1   26ga Galvanized
21073113    1   26ga Galvanized
21073201    1   26ga Galvanized
21073201    1   26ga Galvanized
21073202    1   26ga Galvanized
21073203    1   26ga Galvanized
21073203    1   26ga Galvanized
21073203    1   26ga Galvanized
21073301    2   26ga Galvanized
21073301    2   26ga Galvanized
21073302    2   26ga Galvanized
21073303    2   26ga Galvanized
21073303    2   26ga Galvanized
21073303    2   26ga Galvanized
21073501    2   26ga Galvanized
21073501    2   26ga Galvanized
21073502    2   26ga Galvanized
21073503    2   26ga Galvanized
21073503    2   26ga Galvanized
21073503    2   26ga Galvanized
21081101    1   26ga Galvalume (Alu-Zinc)
21081101    1   26ga Galvalume (Alu-Zinc)
21081102    1   26ga Galvalume (Alu-Zinc)
21081103    1   26ga Galvalume (Alu-Zinc)
21081103    1   26ga Galvalume (Alu-Zinc)
21081103    1   26ga Galvalume (Alu-Zinc)
21081201    1   26ga Galvanized
21081201    1   26ga Galvanized
21081202    1   26ga Galvanized
21081203    1   26ga Galvanized
21081203    1   26ga Galvanized
21081203    1   26ga Galvanized
21420061P   1   22ga Galvaneal
21420061P   1   22ga Galvaneal
21422092P   2   22ga Galvaneal
21422092P   2   22ga Galvaneal
22011035B   2   22ga Black Pre-Painted
22011035B   2   22ga Black Pre-Painted
22011036B   3   22ga Black Pre-Painted
22011036B   3   22ga Black Pre-Painted
22011036B   3   22ga Black Pre-Painted
22011036B   2   22ga Black Pre-Painted
22070874BL  1   22ga Black Pre-Painted
22070874BL  1   22ga Black Pre-Painted
22070875BL  1   22ga Black Pre-Painted
22070876BL  1   22ga Black Pre-Painted
22070876BL  1   22ga Black Pre-Painted
22070876BL  1   22ga Black Pre-Painted
22070887B   1   22ga Black Pre-Painted
22070887B   2   22ga Black Pre-Painted
22070887B   1   22ga Black Pre-Painted
22070887B   2   22ga Black Pre-Painted
22070887B   2   22ga Black Pre-Painted
22273301    2   26ga Galvanized
22273301    2   26ga Galvanized
22273302    2   26ga Galvanized
22273303    2   26ga Galvanized
22273303    2   26ga Galvanized
22273303    2   26ga Galvanized

下面是我合并后的样子:

(blank) Quantity    Material
02210144US  15  (blank)
02332256US  4   (blank)
21010601    2   (blank)
21073101    2   (blank)
21073102    1   (blank)
21073103    3   (blank)
21073111    2   (blank)
21073112    1   (blank)
21073113    3   (blank)
21073201    2   (blank)
21073202    1   (blank)
21073203    3   (blank)
21073301    4   (blank)
21073302    2   (blank)
21073303    6   (blank)
21073501    4   (blank)
21073502    2   (blank)
21073503    6   (blank)
21081101    2   (blank)
21081102    1   (blank)
21081103    3   (blank)
21081201    2   (blank)
21081202    1   (blank)
21081203    3   (blank)
21420061P   2   (blank)
21422092P   4   (blank)
22011035B   4   (blank)
22011036B   11  (blank)
22070874BL  2   (blank)
22070875BL  1   (blank)
22070876BL  3   (blank)
22070887B   8   (blank)
22273301    4   (blank)
22273302    2   (blank)
22273303    6   (blank)

这就是我希望的结果:

Part Number Quantity    Material
02210144US  15  22ga Galvanized
02332256US  4   26ga Galvanized
21010601    2   18ga Neal
21073101    2   26ga Galvanized
21073102    1   26ga Galvanized
21073103    3   26ga Galvanized
21073111    2   26ga Galvanized
21073112    1   26ga Galvanized
21073113    3   26ga Galvanized
21073201    2   26ga Galvanized
21073202    1   26ga Galvanized
21073203    3   26ga Galvanized
21073301    4   26ga Galvanized
21073302    2   26ga Galvanized
21073303    6   26ga Galvanized
21073501    4   26ga Galvanized
21073502    2   26ga Galvanized
21073503    6   26ga Galvanized
21081101    2   22ga Galvanized
21081102    1   22ga Galvanized
21081103    3   22ga Galvanized
21081201    2   26ga Galvanized
21081202    1   26ga Galvanized
21081203    3   26ga Galvanized
21420061P   2   22ga Galvaneal
21422092P   4   22ga Galvaneal
22011035B   4   22ga Black Pre-Painted
22011036B   11  22ga Black Pre-Painted
22070874BL  2   22ga Black Pre-Painted
22070875BL  1   22ga Black Pre-Painted
22070876BL  3   22ga Black Pre-Painted
22070887B   8   22ga Black Pre-Painted
22273301    4   26ga Galvanized
22273302    2   26ga Galvanized
22273303    6   26ga Galvanized

知道我做错了什么吗?我已经检查了 "left column" 和 "top row" 复选框,并尝试了两者的不同组合,只有一个,none,等等。谢谢你的所有帮助可以提供!

尝试:

  1. Select全部数据
  2. 单击数据透视表
  3. 将 'Part Number' 拖到弹出的右窗格中的 'rows' 框中。
  4. 将 'Materials' 拖到行框中的 'Part Number' 下。
  5. 将'Quantity'拖到'Values'框

接下来我们更正格式:

  1. 单击顶部的 'Design' 选项卡
  2. 单击'Subtotals'、'Do not show subtotals'
  3. 单击'Grand totals'、'Off for rows and columns'
  4. 单击'Report layout'、'Repeat all item labels'
  5. 单击'Report Layout'、'show in tabular form'

这应该可以,但它会切换 material 和数量列。

  1. 现在你已经有了数据,如果你想从数据透视表中取出数据,你可以select所有数据,复制,右键单击另一个sheet,点击粘贴图标123 就可以了(粘贴值)。