简体   繁体   中英

Auto-rank newly added to sheets without skipping a number and sort it

I am getting a sheet ranked automatically when a new row gets added (google sheets). The ranking is to avoid skipping a number in case of a tie, ie, if two people have a RANK of 7, then the next person in the line is RANKED as 8 (and not 9)

Here is my formula

=ArrayFormula(SUM(if(A1<A:A,1/COUNTIF(A:A,A:A)))+1)

Question:

  1. How can this formula be auto-repeated when new are added?
  2. How can the rows be shuffled to get the RANK 1 to the top?

This formula will automatically rank as I understand you want it. In C1 (the header in my example) put this:

={"Rank";BYROW(B2:B,LAMBDA(each,IFERROR(RANK(each,UNIQUE(B2:B)))))}

在此处输入图像描述

Then you can sort the range by Column C (if it doesn't appear by default, choose "advanced range sorting options" and you'll find it!)

在此处输入图像描述

With advanced options if needed:

在此处输入图像描述

And this would be the result:

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM