excel2010
选定数据区域A1:B10,插入>>>数据透视表,如下图Select the data area A1:B10, insert the >>> PivotTable, as shown below
把“名称”拉到“行标签”,“数量”拉到“数值”区域,透视表将自动计算结果,如下图Pull the 'name' to the 'row label', the 'quantity' to the 'value' area, the pivot table will automatically calculate the result, as shown below
选定要放置计算结果的首个单元格,如D1,数据>>>合并计算Select the first cell to place the calculation result, such as D1, data >>> merge calculation
“函数”选择“求和”,鼠标放在“引用位置”框中,再选择数据区域A1:B10,框中将自动输入引用位置的单元格地址,单击“添加”按钮,再勾选“首行”和“最左列”复选框,最后单击“确定”按钮,如下图'Function' select 'summation', mouse in the 'reference position' box, and then select the data area A1:B10, the box will automatically enter the cell address of the reference location, click the 'Add' button, and then check ' The first line and the leftmost column check box, and finally click the 'OK' button, as shown below
结果如下图,Excel已自动汇总了数据,并对数量求和,在D1单元格输入名称就可以了。The result is as shown below. Excel has automatically summarized the data and summed the quantities. Enter the name in the D1 cell.