求和 Excel 不同值 [英] Sum Excel Distinct Values

查看:33
本文介绍了求和 Excel 不同值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何用 MySQL 做到这一点,但我不知道如何(或什至可能)在 MS Excel 中.我在 Windows(Office Professional 2010 的一部分)上运行 Excel 版本 14.

I know how to do this with MySQL, but am at a loss as to how (or even if possible) within MS Excel. I am running Excel version 14 on Windows (part of Office Professional 2010).

我有一个包含两列的表格......例如,一列包含电话号码,另一列包含整数(电话长度).每个电话号码都有多个来电,因此这些号码可能会出现多次.我正在尝试对每个不同电话号码的总分钟数求和.如何在 Excel 中执行此操作?

I have a table with two columns...for example one containing phone numbers and the other containing integers (length of phone calls). There are multiple calls from each phone number, so those numbers would likely appear multiple times. I am trying to SUM the total number of minutes per distinct phone number. How can I do this in Excel?

-------------------------
|  number  |  duration  |
-------------------------
| 1234567  |  8         |
| 2345671  |  5         |
| 1234567  |  12        |
| 3456712  |  5         |
| 3456712  |  47        |
| 1234567  |  15        |
| 1234567  |  4         |
-------------------------

所以最终结果将是这样的:

So the end result would be something like:

-------------------------
|  number  |  duration  |
-------------------------
| 1234567  |  39        |
| 2345671  |  5         |
| 3456712  |  52        |
-------------------------

谢谢!

推荐答案

这里是如何使用数据透视表实现这一点.

Here is how to achieve this using pivot table.

我刚刚在此处制作了一个 20 秒的截屏视频.

I just created a 20 seconds screencast here.

这篇关于求和 Excel 不同值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆