[英]Google Sheets lookup 2 columns and sum values of 3rd column
I'm trying to summarize some data.我正在尝试总结一些数据。 Each row has a Person's Name, Date, and Distance data.
每行都有一个人的姓名、日期和距离数据。 For any date, a Person might have multiple rows, which I'm trying to combine by summing the distance of all activiites on that date.
对于任何日期,一个人可能有多行,我试图通过对该日期所有活动的距离求和来合并这些行。
Data looks like this:数据如下所示:
Name![]() |
Date![]() |
Distance![]() |
---|---|---|
Person1![]() |
12/25/2022 ![]() |
50 ![]() |
Person1![]() |
12/26/2022 ![]() |
25 ![]() |
Person1![]() |
12/26/2022 ![]() |
10 ![]() |
Person2![]() |
12/25/2022 ![]() |
5 ![]() |
Person2![]() |
12/26/2022 ![]() |
10 ![]() |
Person2![]() |
12/27/2022 ![]() |
30 ![]() |
Summary table add up the total distances for each day:汇总表将每天的总距离相加:
Name![]() |
12/25/2022 ![]() |
12/26/2022 ![]() |
12/27/2022 ![]() |
---|---|---|---|
Person1![]() |
50 ![]() |
35 ![]() |
0 ![]() |
Person2![]() |
5 ![]() |
10 ![]() |
30 ![]() |
I can't figure out how to build an array for Person/Date to sum for just that date.我无法弄清楚如何为 Person/Date 构建一个数组以仅对该日期求和。
Here's an example sheet where I've tried various vlookup, sumif and other methods but need can't isolate the name-date combo.这是一个示例表,我在其中尝试了各种 vlookup、sumif 和其他方法,但无法隔离名称-日期组合。
Here's an example sheet.这是一个示例表。 Thanks!
谢谢!
https://docs.google.com/spreadsheets/d/1dQUlYD0gvLRm3n2JbEOxCw0JW7rDmKlvFsoyctjyans/edit?usp=sharing https://docs.google.com/spreadsheets/d/1dQUlYD0gvLRm3n2JbEOxCw0JW7rDmKlvFsoyctjyans/edit?usp=sharing
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.