跳到主要內容

如何在不跳過Excel中的數字的情況下對重複項進行排名?

通常,當我們對具有重複項的列表進行排名時,將跳過某些數字,如下面的屏幕快照1所示,但是在某些情況下,我們只想對唯一數字進行排名或對具有相同數字的重複項進行排名,而無需跳過屏幕快照2所示的數字。 在Excel中解決此任務有技巧嗎?

文檔等級重複,不跳過1 文檔等級重複,不跳過2


對重複項進行排名而不跳過數字


箭頭藍色右氣泡 對重複項進行排名而不跳過數字

如果要對所有具有唯一編號的數據進行排名,請選擇數據C2旁邊的空白單元格,鍵入此公式 =RANK(A2,$A$2:$A$14,1)+COUNTIF($A$2:A2,A2)-1,然後向下拖動自動填充手柄以將此公式應用於單元格。 看截圖:
文檔等級重複,不跳過5

如果要對具有相同編號的重複項進行排名,可以應用此公式 =SUM(IF(A2>$A$2:$A$14,1/COUNTIF($A$2:$A$14,$A$2:$A$14)))+1 在數據的下一個單元格中,按 Shift + Ctrl + 輸入 鍵,然後向下拖動自動填充手柄。 看截圖:
文檔等級重複,不跳過4

小費。如果您想快速選擇並突出顯示重複項或唯一值,請嘗試使用Kutools for Excel的 選擇重複和唯一單元格 實用程序,如以下屏幕快照所示。 它在30天內無限制地提供完整功能, 請下載並立即免費試用。

doc在第6列中突出顯示重複項

最佳辦公生產力工具

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

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

kte選項卡201905


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

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (11)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This is showing the rank in ascending order. Can I get it to show in descending order?
This comment was minimized by the moderator on the site
This formula will allow ties and not skip in ranks when scoring see cell F35 for the example
https://docs.google.com/spreadsheets/d/1Y1AHRn-bRnVex-tFwbPV9bN4t46usrFAvRPsUPUn6i4/edit?usp=sharing


=SUMPRODUCT((DD34<$F34:$DT34)/COUNTIF($F34:$DT34,$F34:$DT34))+1
This comment was minimized by the moderator on the site
=RANK(A2,$A$2:$A$14,1)+COUNTIF($A2:A$3,A2)-1 This formula has a problem:

If the 3 first records are the same number the formula will generate a duplicate ranking for the Record #1 and Record #3 .

Example: 10 , 10, 10, 21, 4, 9 the ranking generated will be 3, 2, 3, 1, 6, 5 Ranking # is generated twice
This comment was minimized by the moderator on the site
Dear Miguel, thanks for your pointing out mistake, I have updated the tutorial, you can try this formula =RANK(A2,$A$2:$A$14,1)+COUNTIF($A$2:A2,A2)-1
This comment was minimized by the moderator on the site
It's a very nice example, but you inverted the ranking in the end... in the original rank (19) was the highest value and had a rank of 1. In your pair of formulas it made (10), which is actually the lowest number in the set rank 1.

How do you adjust the formula so (19) stays with a rank of 1?
This comment was minimized by the moderator on the site
Hello, Joe Dirt, I do not get your problem clearly, could you give me more details?
This comment was minimized by the moderator on the site
Thank You.
This comment was minimized by the moderator on the site
The formula works if have to rank up to 100. From 100 skips to 102.
This comment was minimized by the moderator on the site
Thank you for the formula. How do you keep it staying at zero when you don't type anything yet.
This comment was minimized by the moderator on the site
Do you mean keep blank cells display zero in general or when you count numbers?
This comment was minimized by the moderator on the site
Thank you very much for sharing how to rank using consecutive numbers! It was just what I was looking for. Very counter-intuitive for sure, and I've written a few formulas that make your head hurt. This one made MY head hurt! :)
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations