Excel 函数,如何设置排名前百分之几的数值,返回一个固定值。

2024-11-30 20:40:12
推荐回答(3个)
回答(1):

不知道你说的数值合计要不要从小到大累加,还是按现在的行排序向上累加,

按现在的行排序向上累加,在蚂橘b1输入公式,下拉填充:
=if(SUM(INDIRECT("$a$1:$A$"&ROW()))/sum($A$1:$A$1000)<=5%,5,if(SUM(INDIRECT("$a$1:$A$"&ROW()))/sum($A$1:$A$1000)<=15%,4,if(SUM(INDIRECT("$a$1:$A$"&ROW()))/sum($A$1:$A$1000)<=50%,3,"闷闷团")))

从小到大累加,在b1输入公式,下拉填充
=if(sumif($A$1:$A$1000,"<罩孙="&a1)/sum($A$1:$A$1000)<=5%,5,if(sumif($A$1:$A$1000,"<="&a1)/sum($A$1:$A$1000)<=15%,4,if(sumif($A$1:$A$1000,"<="&a1)/sum($A$1:$A$1000)<=50%,3,"")))

回答(2):

你的意思不太看得明白,猜一下,是不是这样,漏橡举将A列百分比排位前百分之5的,显示返碧为5,前百分之15的,显示为4,前百如含分之50的,显示为3,否则为空,如果都猜对了,假设数据在A1:A1000中,B1中输入
=LOOKUP(PERCENTRANK(A$1:A$1000,A1),{0,"";0.5,3;0.85,4;0.95,5})
用自动填充柄下拉。

回答(3):

=IF(A1>=large(A1:A1000,50),5,IF(A1>=large(A1:A1000,150),4,IF(A1>=large(A1:A1000,500),3,"50%以带羡外蠢枝拍"搭枝)))