简体   繁体   中英

Calculate average of based on weekly dates EXCEL

I am completely new at excel and I have an assignment involving 12k of rows. 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; 2/9/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. 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

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

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

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

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

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

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

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

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

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

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.

This is a perfect candidate for a PIVOT table. 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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