[英]Calculating Average per any Given Month in Excel
I need to calculate the cadence that people send emails. 我需要计算人们发送电子邮件的频率。 So I have column A being email addresses, column B being the date they sent an email. 因此,我的A列是电子邮件地址,B列是他们发送电子邮件的日期。 I have data over a few years and needs to see on average, in any given month, how often does someone send email. 我拥有几年的数据,需要平均在任何给定的月份查看某人发送电子邮件的频率。 So I need Excel to count the number of times an email address shows up in a given month/year and then find the average for that email address for ALL months/years. 因此,我需要Excel计算给定月份/年份中某个电子邮件地址出现的次数,然后找到所有月份/年份中该电子邮件地址的平均值。
For example: If I send four emails: Jan 2017, Jan 2017, Feb 2017, Feb 2016. I want column C to show 1.333 (the average number of emails I sent in any given month and year) every time my email address shows up. 例如:如果我发送四封电子邮件:2017年1月,2017年1月,2017年2月,2016年2月。我希望列C每次显示我的电子邮件地址时显示1.333(在给定的月份和年份中发送的平均电子邮件数)。 。
I have tried countless formulas from this site, but none work for this exact need. 我从该站点尝试了无数公式,但没有一个可以满足这一确切需求。 Thanks! 谢谢!
So if you have your two columns of date code (A) and email sender (B), then make a small table with each unique sender name from your sender column - Mine starts in E2, with the first row being column headers for readability. 因此,如果您有两列日期代码(A)和电子邮件发件人(B),则使用发件人列中的每个唯一发件人名称制作一个小表-Mine从E2开始,第一行是列标题,以提高可读性。
Somewhere on your sheet put the date you want to be your start date, to be referenced in the averaging formula - mine is in F6. 在工作表上的某处放置了您希望作为开始日期的日期,该日期将在平均公式中进行引用-我的位置在F6中。 Use a format similar to your date code, mmmyyyy. 使用类似于您的日期代码mmmyyyy的格式。
In another place create a vlookup table to match month name to number, mine starts at I2. 在另一个地方,创建一个vlookup表以将月份名称与数字进行匹配,我的位置从I2开始。
To average emails sent by year use =COUNTIF(B:B,E2)/(1+ YEAR(TODAY())-RIGHT($F$6,4)) To average emails per month use =COUNTIF(B:B,E2)/(12 * (YEAR(TODAY())-RIGHT($F$6,4)) + Vlookup(Left($F$6,3),$I$2:$J$13,2, False)) 要平均每年发送的电子邮件,请使用= COUNTIF(B:B,E2)/(1+ YEAR(TODAY())-RIGHT($ F $ 6,4))要平均每月发送的电子邮件,请使用= COUNTIF(B:B,E2 )/(12 *(YEAR(TODAY())-RIGHT($ F $ 6,4))+ Vlookup(左($ F $ 6,3),$ I $ 2:$ J $ 13,2,False))
I'm not sure if there's a nice on the fly way to do it without the extra cells and tables but that should get you what you want. 我不确定是否有没有其他多余的单元格和表格的即时解决方法,但这应该可以为您提供所需的东西。 You should be able to drag the formula down the entire column. 您应该能够将公式向下拖动到整个列中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.