计算达到的时间从 0 到 10 的分数
我有一个 Google 电子表格,其中包含许多团队的值(以秒为单位)。我想计算每个团队从 0 到 10 的分数:值最低的团队为 10 分,值最高的团队为 0 分,中间值的团队为 9-1 分(均匀分布)。
我想不出任何公式可以做到这一点。
I have a Google Spreadsheet with a value (in seconds) for a lot of teams. I want to calculate points for each team from 0-10: 10 points for the team with the lowest value, 0 points for the team with the highest value and 9-1 points for the values in between (evenly distributed).
I can't think of any formula to do this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
经过一段时间的休息后,我找到了一种方法:
对我有用
After a little break I figured out a way to do it:
Works for me
这是一个相当简单的分箱问题。
假设您有一个范围,其中包含球队和列中的秒数,并且秒列是 B1:B30,您要做的第一件事就是按秒降序对范围进行排序。
然后计算垃圾箱的大小。有两种可能性:一种是“均匀分布”,意思是每个 bin(分数)代表相同的时间间隔,另一种是每个 bin 包含相同数量的团队。
对于时间版本,使用公式
=(B1-B29)/9
创建一个名为“binsec”的单元格然后突出显示 C1:C30 并输入数组公式
对于团队数量版本,使“binpop”=28/9。
突出显示 C1:C30 并输入数组公式
这两个都在 Excel 2007 中测试得很好。
This is a fairly straightforward binning problem.
Assuming you have a range with the teams and seconds in columns, and the seconds column is B1:B30, the first thing you do is sort the range on seconds descending.
Then you calculate the size of the bin. There are two possibilities: one is that by "evenly distributed" you mean each bin (score) represents the same time interval, the other is that each bin holds the same number of teams.
For the time version, make a cell named "binsec" with the formula
=(B1-B29)/9
Then highlight C1:C30 and enter the array formula
For the number of teams version make "binpop" =28/9.
Highlight C1:C30 and enter the array formula
Both of these test well with Excel 2007.