简体   繁体   English

excel如果a列中的名称与b列具有相同的日期,则将c列中的所有结果相加

[英]excel if a name in column a has the same date as column b add together all results in column c

I've been having a problem that I can't seem to solve fully. 我遇到了一个似乎无法完全解决的问题。 Basically, I have a range of data that looks like this. 基本上,我有一系列看起来像这样的数据。

START DATE(UTC)      DURATION (mins)     NAME
--------------------|-------------------|------
5/08/2018            5                   Home
5/08/2018            1017.616667         Home
5/08/2018            493.9166667         Sleep
5/08/2018            19.6                Mindfulness
6/08/2018            8.55                Transport
6/08/2018            115.1333333         Gym
6/08/2018            12                  Transport
6/08/2018            6.483333333         Home
6/08/2018            6.75                Home
6/08/2018            1170.716667         Home
6/08/2018            510.2166667         Sleep

My goal is to collate the durations that have a matching name and occur on the same date and then apply a formula to a largish data set. 我的目标是整理名称相同且在同一日期发生的持续时间,然后将公式应用于较大的数据集。 So I should be able to get 1022 for "Home" for the 5/08/2018 and 1184 for "Home" on 6/08/18. 所以我应该能够在2018年5月8日获得1022的“家庭”和1184年的1184的“家庭”。 I've tried a sumif but only managed to add up all those that occurred within 30 days. 我已经尝试过sumif,但只设法将30天内发生的所有事件加起来。

Any help with this would be awesome 任何帮助都会很棒

Thank you 谢谢

You could use a pivot table: Insert > Pivot Table . 您可以使用数据透视表: Insert > Pivot Table Put Name into the Columns field, Start Date into the Rows field and Sum of Duration in the Values field. 将“名称”放入“ Columns字段,将“开始日期”放入“ Rows字段,并将“持续时间Sum ”放入“ Values字段。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel如果A列具有相同的值,则在B列中突出显示最大日期 - Excel If column A has same value then highlight max date in column B Excel VBA在同一日期在B列中计算B列中的重复项 - Excel VBA count duplicates in Column B within same date in Column A python / excel:如何为列A中的所有相同值添加列B的值 - python/excel: How do I add values of column B for all the same values in column A Excel:为A列的相同值计算B列的平均值,其中仅存在B列的所有值对应于相同的A值 - Excel: calculate average of column B for same values of column A where only all values of column B to corresponding same A value is present Excel VBA —查找列A中任何值的第一个出现位置,然后将列B的值插入列C(同一行) - Excel VBA — Find first occurrence of any value in column A, then insert value of column B into column C (same row) 将所有@mentions和#hashtags从A列复制到Excel中的B和C列 - Copying all @mentions and #hashtags from column A to Columns B and C in Excel 如果 A、B 和 C 列都匹配(Excel),则合并行? - Merge rows if Column A, B, and C all match (Excel)? 将A列中的文本与B列中的文本合并,输出到C列-Excel - merge text in column A with text in column B, output into column C - excel Excel:在列C中的列B中找不到列A中的值 - Excel: Print Values from Column A not found in Column B in Column C Excel:如何平均 B 列中与 A 列中具有相同数字的所有数字? - Excel: How to average all numbers in column B that have the same number in Column A?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM