简体   繁体   English

Excel公式,用于计算每天价格上涨的平均值

[英]Excel formula for an average where the price increases every day

Can some one help me with a simple forumla in excel for the following problem. 有人可以为我提供一个简单的Excel论坛来解决以下问题吗?

I need to be able to predict an average price for the month. 我需要能够预测该月的平均价格。 For example, if the current price is $1000 and there are 5 days left until the end of the month, I believe the price will increase £50 p/day. 例如,如果当前价格为$ 1000,并且到月底还剩5天,我相信价格将增加£50 p / day。 1050 then 1100 1150 etc So the average price for the last six days will be 1100? 1050,然后是1100 1150,以此类推,那么过去六天的平均价格将是1100?

i would like to be able to do a forumla that works it out from the current price, the increase amount and the days left with out having to have a cell for each day etc? 我想能够做一个从当前价格,增加金额和剩余天数中得出结果的论坛,而不必每天都有一个单元等。

Is this possible? 这可能吗? i have tried google but have come up with nothing, a difficult question to articulate. 我试过谷歌,但什么也没想出来,这是一个很难阐明的问题。

Sounds like you're having troubles finding the days in the month and the percentage of the month that has already passed / left 听起来您在查找一个月中的日子以及已经过去/离开的那个月的百分比时遇到了麻烦

To calculate the number of days in the current month use this formula 要计算当月的天数,请使用此公式

=EOMONTH(NOW(), 0)-EOMONTH(NOW(), -1)

To calculate the current day of the month use this formula 要计算该月的当前日期,请使用此公式

=DAY(NOW())

To calculate the percentage of the month already gone 计算已经过去的月份的百分比

=DAY(NOW()) / (EOMONTH(NOW(), 0)-EOMONTH(NOW(), -1))

To calculate the percentage of the month remaining 计算剩余月份的百分比

=1 - (DAY(NOW()) / (EOMONTH(NOW(), 0)-EOMONTH(NOW(), -1)))

I'm not clear what you are averaging - is it 5 days or 6? 我不清楚您的平均水平-是5天还是6天?

If you start with 1000 and average 5 days then you are averaging 1000, 1050, 1100, 1150 and 1200 so the average is 1100 - if that's the required result try this formula 如果您以1000开头,平均5天,那么您将平均得到1000、1050、1100、1150和1200,因此平均值为1100-如果这是必需的结果,请尝试以下公式

=A2+B2*(C2-1)/2

where A2 is price, B2 increase amount and C2 days left 其中A2是价格,B2增加金额,还有C2天

If you are averaging 6 days then that starts at 1000 and ends at 1250 so average is 1125 and the formula should be: 如果您平均6天,则从1000开始到1250结束,因此平均值为1125,公式应为:

=A2+B2*C2/2

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

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