有没有办法动态更改 MS Excel 中计算使用的范围?

发布于 2025-01-17 14:03:55 字数 1484 浏览 2 评论 0原文

我有一个像这样的数据集 -

slicetime_idWeight
1010
2020
3030
1110
215
3125
1230
2210
3220

获得排名列的最佳方法是什么?计算与前一个 time_id 对应的切片的排名? 例如,同一个表的输出应如下所示 -

slicetime_idWeightRank
10100
20200
30300
11103
2152
31251
12302
21023
32201

我尝试了excel排名功能(必须手动设置排名范围在函数中,对每个 time_id 进行排名(切片,范围),但这是太多的手动工作,而且我有数百个切片和时间段。那么实现这一目标的最佳方法是什么?

我的目标是根据 time_id-1 期间的权重找到 time_id 的前 n 个切片

I have a dataset like this -

slicetime_idweight
1010
2020
3030
1110
215
3125
1230
2210
3220

What will be the best method to get a rank column, which computes the rank for slices corresponding to the previous time_id?
For instance, the output for the same table should look something like this -

slicetime_idweightRank
10100
20200
30300
11103
2152
31251
12302
22103
32201

I tried the excel rank function (had to manually set the rank range in the function, rank(slice, range) for every time_id), but it is too much manual work and I have slices and time periods in the hundreds. So what will be the best way to achieve this?

My objective is to find the top n slices for a time_id, based on weight during time_id-1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

稚气少女 2025-01-24 14:03:55

从Microsoft支持中获得了解决方案,并且可以

将此公式放入E2中,然后拖动
= if($ b2 = 0,0,countifs($ b $ 2:$ b $ 100,索引($ b $ 2:$ b $ $ 100,行(2:2)-4),$ c $ 2:$ c $ 100,”&gt ;“& index($ c $ 2:$ c $ 100,行(2:2)-4))+1)

Got the solution from Microsoft support and it works-

Put this formula in E2 and drag down
=IF($B2=0,0,COUNTIFS($B$2:$B$100,INDEX($B$2:$B$100,ROW(2:2)-4),$C$2:$C$100,">"&INDEX($C$2:$C$100,ROW(2:2)-4))+1)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文