每日动态平均订单数(按日期) [英] Dynamic Average Orders Per Day Counter By Date
问题描述
在过去的一个小时里,我一直遇到一些麻烦,希望你们中的一个能帮助我:)
I have been having some trouble figuring this out for the last hour, I hope one of you can help me out :)
因此我想出了计算每日平均订单的公式,如下所示:
{=COUNTA(A2:A7)/SUM(1/COUNTIF(A2:A7,A2:A7))} 'PRESS (CTRL + SHIFT + ENTER)'
数据:
A
1 | ORDER DATE
2 | 12/05/2019
3 | 12/05/2019
4 | 12/05/2019
5 | 15/05/2019
6 | 16/05/2019
7 | 22/05/2019
8 |
9 |
10|
结果:
1.5
我的公式仅在A7之前可以正常计算.我如何使公式动态化,以便它可以计算出将来的数据条目,直到A10和/或A列下方的无穷大为止?
My formula works fine to calculate only until A7. How would I make the formula dynamic so that it can calculate future data entries until A10 and/or infinity down the A column?
谢谢
推荐答案
可以使用以下方式检索列A中最后一个日期的单元格,
The cell with the last date in column A can be retrieved with,
index(A:A, match(1e99, A:A))
将其放入您的公式中,
=COUNTA(A2:index(A:A, match(1e99, A:A)))/SUM(1/COUNTIF(A2:index(A:A, match(1e99, A:A)), A2:index(A:A, match(1e99, A:A))))
这是一种非易失性解决方案(与OFFSET不同).仅当影响公式的某些因素发生变化时,它才会重新计算;当工作簿中的任何内容发生更改时都不会.
This is a non-volatile solution (unlike OFFSET). It will only recalculate when something that affects the formula changes; not when anything in the workbook changes.
这篇关于每日动态平均订单数(按日期)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!