简体   繁体   English

我如何根据某个数字在Excel中计算每周平均值

[英]How can I calculate a weekly average in Excel from a certain figure

I have a figure which is 2880 in cell A1 lets say it's a monthly salary and in this example there are 31 days in the month. 我在A1单元格中有一个2880的数字,可以说这是月薪,在此示例中,该月有31天。

What I want to work out is what would be the weekly average of this figure. 我想算出的是这个数字的每周平均值。 Considering it is just over 4 whole weeks - I can't divide by 4 as that's not accurate but then I can't divide by 5 either for the same reason. 考虑到整整四个星期-我不能除以4,因为那是不准确的,但出于同样的原因,我也不能除以5。

So what I need is a calculation which can give me an exact weekly average - is this it all possible or am I trying to complicate matters? 因此,我需要的是一个可以给我确切的每周平均值的计算-这是否可能?或者我正试图使事情复杂化?

Thanks Dan 谢谢丹

You can use the following formula where cell C2 is the number of the month (March would be 3): 您可以使用以下公式,其中单元格C2是月份数(3月为3):

=ROUND(C3/(DATE(1,C2+1,1)-DATE(1,C2,1))*7,2)

See screenshot of the example: 查看示例的屏幕截图:

在此处输入图片说明

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

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