跳到主要內容

如何在Excel中唯一地對范圍號進行排名而不重複?

在Microsoft Excel中,普通等級函數將重複的數字賦予相同的等級。 例如,如果數字100在選定範圍內出現兩次,並且第一個數字100的排名為1,則最後一個數字100的排名也為1,這將跳過某些數字。 但是,有時,您需要按照顯示的以下屏幕快照對這些值進行唯一排序。 有關唯一排名的更多詳細信息,請按照以下教程逐步進行。

以唯一的降序排列範圍編號

以唯一的升序排列範圍編號


以唯一的降序排列範圍編號

在本節中,我們將向您展示如何按降序唯一地對范圍號進行排名。

以下面的截圖數據為例,可以看到A2:A11範圍內有多個重複的數字。

1.選擇B2,複製並粘貼公式 =RANK(A2,$A$2:$A$11,0)+COUNTIF($A$2:A2,A2)-1配方欄,然後按 Enter 鍵。 看截圖:

2.然後,排名編號顯示在單元格B2中。 選擇單元格B2並將光標放在其右下角,當顯示一個小的黑色十字時,將其向下拖動到單元格B11。 然後,唯一排名成功。 看截圖:


以唯一的升序排列範圍編號

如果要按升序唯一地對范圍編號進行排名,請執行以下操作。

1.選擇單元格B2,複製並粘貼公式 =RANK(A2,$A$2:$A$11,1)+COUNTIF($A$2:A2,A2)-1配方欄,然後按 Enter 鍵。 然後,第一個排名編號顯示在單元格B2中。

2.選擇單元格B2,將填充手柄向下拖動到單元格B11,然後完成唯一排名。

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (27)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi every one, i have this formula
=RIJEN($H$2:$H$7)-SOMPRODUCT(--(H2-E2/10000>$H$2:$H$7-$E$2:$E$7/10000))

it determines the rank of a value in a column. if there is an equal value, the rank is determined by a 2nd value in another column. Now the problem is when negative numbers occur in the 2nd column, the rank is determined inversely -1 gets a lower rank than 0

can anyone adjust this formula or create a new one for excel 2007 dutch version
This comment was minimized by the moderator on the site
Hi every one, i have this formula
=RIJEN($H$2:$H$7)-SOMPRODUCT(--(H2-E2/10000>$H$2:$H$7-$E$2:$E$7/10000))

it determines the rank of a value in a column. if there is an equal value, the rank is determined by a 2nd value in another column. Now the problem is when negative numbers occur in the 2nd column, the rank is determined inversely -1 gets a lower rank than 0

can anyone adjust this formula or create a new one for excel 2007 dutch version

thanks
This comment was minimized by the moderator on the site
Hey so I just worked on this formula for the past 45 minutes. The above formula is wrong, the output does provide duplicates but that is only because the countif range is not accounting for the entire range.

Above the descending formula is: =RANK(A2,$A$2:$A$11,0)+COUNTIF($A$2:A2,A2)-1

The bold/underlined A2 cell should be equal to the ending of the range which is A11. Which would make correct forumla stance:

=round(RANK(A2,$A$2:$A$11,0)+COUNTIF($A$2:A7,A2)-1

For visuals, on my sheet I created a leader tracking board with the following formula and I got no duplicates see below 2 images with duplicate numbers but different ranking levels:


My Descending formula: =round(RANK(D7,$D$7:$BY$7)+countif($D$7:$BY$7,D7)-1)
Key Notes:
- My range is locked
- D7 is the start of my range and BY7 is the end of my range
- I have added the round formula to account for any decimals
- the (-1) will automatically subtract from the previous ranking.
This comment was minimized by the moderator on the site
Hi Zoe,
Thank you for your feedback. I will check the formula and make the changes.
This comment was minimized by the moderator on the site
It's very helpful content. Thank You so much.
This comment was minimized by the moderator on the site
Thank you for the solution! Works perfectly!
This comment was minimized by the moderator on the site
This tip was PERFECT in solving my sorting issue! Thanks very much!!!
This comment was minimized by the moderator on the site
I still have duplicate rankings. Before I used COUNTIF the rankings were 4 for both, now they are both ranked 5 with COUNTIF BUT in my chart, it will only list one of the items twice instead of listing both items. Here is my formula: =RANK(V3,V$3:V$30, 1)+COUNTIF(V$3:V$30:V3,V3)-1
In the ranking chart it displays rank 4 as team 1 and rank 5 as team 1 since team 1 and team 2 have the same rank, team 2 is not listed. Here is the formula for those cells:=INDEX($L$3:$L$30,MATCH(SMALL($V$3:$V$30,Y3),$V$3:$V$30,0))
How do I make sure teams that are tied do not get left off list?


This comment was minimized by the moderator on the site
Formulas for unique ascending and descending are identical. Ascending should be: =RANK(A2,$A$2:$A$11,1)+COUNTIF(A2:$A$2,A2)-1.
This comment was minimized by the moderator on the site
if you see the below ranking, where the duplicate numbers found, number is missing.
Exmples
After 23 it goes to 25, after 29 it goes to 30, Formula miss the next number like - 24 & 29

Score Rank

4661 21

4650 22

4648 23

4645 25

4645 25

4644 26

4629 27

4626 28

4595 30

4595 30

4578 31

4438 32
This comment was minimized by the moderator on the site
What's the formula for this ranking where it combines same values into one ranking???
This comment was minimized by the moderator on the site
Hi, This formula just ranks all numbers in ascending/descending order and doesn't combine the duplicates into one rank. How do I combine the ranking for duplicates, for example two duplicate 100s to be combined and both ranked as 1, 3 duplicate 90s to be combined and ranked as 2, 2 duplicate 80s ranked as 3, etc.? In your example of total 10 students I want a formula that will rank the two 100s as 1, rank the two 90s as 2, rank the two 80s as 3, etc. Please help. Thanks
This comment was minimized by the moderator on the site
if you do want this kind of ranking, what I would do is copy the whole list somewhere else, then use remove duplicates in the Data menu to leave only the individual values. rank these individual scores using a standard RANK formula and then use a simple VLOOKUP formula to return the value against the score in the full list.

this will show the values the way you want above.
This comment was minimized by the moderator on the site
Why do you need to do this? a standard RANK formula will rank these examples as 1, 1, 3, 3, 5, 5. this is a much more usual way of ranking as if there are 2 first places the next in line would usually logically be 3rd not 2nd.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations