简体   繁体   English

当月结束时如何计算月平均值

[英]How to calculate a monthly average when the month is not finished

Let's say I have a 12 cells on column A with the sales for each month last year. 假设我在A栏上有12个单元格,其中包含去年每个月的销售额。 To calculate a monthly I can do a simple formula like this in A13 =sum(A1:A12)/12. 要计算月度,我可以在A13 = sum(A1:A12)/ 12中做一个简单的公式。 But in column BI have the sales for this year, not a complete year, and August is not finished, but I have the running amount of sales for this month, so far. 但是在BI列中有今年而非整年的销售,并且8月还没有结束,但是到目前为止,我有这个月的销售量。 What kind of formula can I use to return a more accurate average? 我可以使用哪种公式来返回更准确的平均值?

Eduardo 爱德华多

Divide the current total by the total number of days in the month that have passed so far. 用当前总数除以到目前为止该月过去的总天数。 Then multiply by the total number of days in the month. 然后乘以该月的总天数。

If you are only looking for a projection for the year I would recommend this: 如果您只是在寻找年度预测,我建议您这样做:

Divide the sum you have for the current year * 365 so far in the data by days to date. 将数据中当前年度的总和* 365除以迄今为止的天数。 That will give you a cheap sum. 那会给你便宜的。

sum * 365 / total days to date 总和* 365 /迄今为止的总天数

Ideally you could figure out the ratio of revenue and you have a seasonal business: 理想情况下,您可以计算出收入的比例,并且您拥有季节性业务:

Last year to date / last year total = Last year percentage to date 去年迄今为止/去年总计=去年迄今为止百分比

This year to date / Last year percentage to date : would project the average for the full year. 今年迄今为止/去年迄今为止的百分比:将预测全年的平均值。

Easy 2-step process: 简单的两步过程:

I have my data in two columns: Date, # of Widgets Sold 我的数据分为两列:日期,售出的小部件数量

  1. Add a 3rd column "Month", and use the month and year function to return the month for each date (format cells as a number) (eg, =MONTH(A2)&"/"&YEAR(A2) ) 添加第三列“ Month”,并使用month和year函数返回每个日期的月份(将单元格格式设置为数字)(例如=MONTH(A2)&"/"&YEAR(A2)
  2. Generate a pivot table using the # of Widgets Sold and Month columns that sums/averages the data by month 使用“已售出的小部件数量”和“月”列生成数据透视表,按月对数据求和/求平均值

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

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