简体   繁体   English

根据每周日期计算平均值EXCEL

[英]Calculate average of based on weekly dates EXCEL

I am completely new at excel and I have an assignment involving 12k of rows. 我是excel的新手,我的作业涉及12k行。 Basically, I have to calculate the average of the all the values from the same date. 基本上,我必须计算同一日期所有值的平均值。 These dates follow the arithmetic succession with a difference of 7. Therefore, dates will be like 2/2/52; 这些日期跟算术序列相差7。因此,日期将像2/2/52; 2/9/52; 2/9/52; 2/16/52; 2/16/52; 2/23/53 etc. I know how to find the average of a specific group of values, but selecting one group of values at a time to find the average will take forever because there must be about 5k of different dates. 2/23/53等。我知道如何找到一组特定值的平均值,但是一次选择一组值来查找平均值将是永久性的,因为必须有大约5k个不同的日期。 Therefore, I was looking for an automated way that allows me to find the average without going to select the values every single time. 因此,我一直在寻找一种自动化的方法,使我能够找到平均值而不必每次都选择值。 The following is an example of the spreadsheet that I am dealing with: 以下是我正在处理的电子表格的示例:

DATE------------------VALUE DATE ------------------ VALUE

2/2/52----------------3.5 2/2/52 ---------------- 3.5

2/2/52----------------3.4 2/2/52 ---------------- 3.4

2/2/52----------------2.5 2/2/52 ---------------- 2.5

2/9/52----------------4.5 2/9/52 ---------------- 4.5

2/9/52----------------3.6 2/9/52 ---------------- 3.6

2/16/52---------------2.4 2/16/52 --------------- 2.4

2/16/52---------------4.1 2/16/52 --------------- 4.1

2/16/52---------------3.1 2/16/52 --------------- 3.1

2/16/52---------------4.2 2/16/52 --------------- 4.2

2/16/52---------------2.34 2/16/52 --------------- 2.34

Also, please note that the dates do not change in a pattern, meaning dates do not change every n rows. 另外,请注意,日期不会按模式更改,这意味着日期不会每隔n行更改一次。

This is a perfect candidate for a PIVOT table. 这是PIVOT表的理想选择。 Here is your data. 这是您的数据。

DATE    VALUE
2/2/1952    3.5
2/2/1952    3.4
2/2/1952    2.5
2/9/1952    4.5
2/9/1952    3.6
2/16/1952   2.4
2/16/1952   4.1
2/16/1952   3.1
2/16/1952   4.2
2/16/1952   2.34

Select the data and insert pivot table. 选择数据并插入数据透视表。 Drag Date into rows Drag VALUE into VALUES Drop down on the values - select value settings and select Average 将“日期”拖到行中将“值”拖到“值”中下拉值-选择值设置并选择“平均值”

Row Labels  Average of VALUE
2/2/1952    3.133333333
2/9/1952    4.05
2/16/1952   3.228

Grand Total 3.364 总计3.364

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM