
RANK函数是Excel中常用的函数,它可用于返回一个数字在数字列表中的排位。语法结构是=RANK(number,ref,[order])

下面给大家举一个例子演示一下吧,如下图是某班级成绩表,现在我们想要将学生按成绩降序排位。

在C2单元格输入公式=RANK(B2,$B$2:$B$12,0),并填充到底即可完成。

在使用时,为了方便我们也可以将公式写为=RANK(B2,$B$2:$B$12)省略掉第三参数0.(ps:RANK函数第三参数为0或省略时,数字按从大到小降序排位即降序排位)

上面是降序排位可是如果我们想要升序该怎么办呢?这个简单,我们只需要将公式改为=RANK(B2,$B$2:$B$12,1)即可

在使用RANK函数时需要注意,出现两个相同数字的时候,结果排名就会并列,并且缺少下一个名次,如下图,两个第1名,接下来就直接是第3名,而没有第2名了。

相关文章
暂无评论...