如何使用数字和文本合并重复数据

时间:2017-04-25 16:42:01

标签: excel consolidation

大家下午好。

我试图合并一个充满重复值的表格,并且我发现了"整合"功能非常适用于此,但是,我偶然发现的问题是它不会保留"材料"合并后的文字。

这是原始数据:

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

知道我做错了什么吗?我已经检查了两个"左栏"和#34;顶行"复选框,以及尝试两者的不同组合,只有一个,没有,等等。感谢您提供的任何和所有帮助!

1 个答案:

答案 0 :(得分:1)

尝试:

  1. 选择所有数据
  2. 单击数据透视表
  3. 将弹出的右侧窗格中的“零件编号”拖到“行”框中。
  4. 在行框中的“零件编号”下拖动“材料”。
  5. 将“数量”拖动到“值”框
  6. 接下来我们更正格式:

    1. 点击顶部的“设计”标签
    2. 点击“小计”,“不显示小计”
    3. 点击“总计”,“关闭行和列”
    4. 点击“报告布局”,“重复所有项目标签”
    5. 点击“报告布局”,“以表格形式显示”
    6. 这应该这样做,但它会切换材料和数量列。

      1. 现在你有了数据,如果你想要它不在pivotTable表单中,你可以选择所有数据,复制,右键单击另一个工作表,单击粘贴图标,上面有123(粘贴值)。