跳到主要內容

如何對一列中的十進制數字排序?

如果您有一個十進制數字列表,則使用Excel中的內置排序功能,數據將按值正常排序。 但是,有時,您需要按照小數點右邊的數字對數據進行排序,如下圖所示。 您有什麼好的方法可以在Excel中解決此任務?

doc按十進制1排序

使用助手列對列表中的十進制數字進行排序


箭頭藍色右氣泡 使用助手列對列表中的十進制數字進行排序

要基於小數點右邊的數字對十進制數進行排序,應創建一個幫助器列,然後按新的幫助器列對數據進行排序,請執行以下操作:

1。 輸入以下公式: =INT(A2)&"."&TEXT(RIGHT(A2,LEN(A2)-(FIND(".",A2))),"000") 放入數據旁邊的空白單元格中 B2,例如,請參見屏幕截圖:

doc按十進制2排序

2. 然後將填充手柄向下拖動到要包含此公式的單元格,並顯示一個新的列數據,然後單擊 數據 > 分類 要在此新的幫助器列上對數據庫進行排序,請參見屏幕截圖:

doc按十進制3排序

3. 在彈出 排序警告 框,請選擇 擴大選擇 選項,請參見屏幕截圖:

doc按十進制4排序

4。 然後點擊 分類 按鈕,然後在 分類 對話框中,從中選擇已創建的幫助器列。 排序 下拉列表,然後選擇 價值觀 來自 排序 部分,最後選擇“ 過往訂單 部分,請參見屏幕截圖:

doc按十進制5排序

5。 然後點擊 OK 按鈕,另一個 排序警告 彈出提示框,請選擇 分別對數字和存儲為文本的數字進行排序 選項,請參見屏幕截圖:

doc按十進制6排序

6。 然後點擊 OK 按鈕,數據已根據需要按小數點右邊的數字排序。 看截圖:

doc按十進制7排序

7。 最後,您可以根據需要刪除幫助器列的內容。

最佳辦公生產力工具

🤖 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 (6)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
What if you have multiple decimals? How would I work around that?
This comment was minimized by the moderator on the site
This worked great - thank you. Could have puzzled it out but this was a quick and neat solution.
This comment was minimized by the moderator on the site
this didn't work for me. 4.1 and 4.10 both turned into 4.001
This comment was minimized by the moderator on the site
This is much easier if you're going to use a helper column... Copy the number list you're trying to sort into a helper column and remove all of the delimiters using Find & Replace ("." or ",", etc.) from those numbers. Sort lowest to highest, and your list will be in the right order.
This comment was minimized by the moderator on the site
this works for me thanks!!!
This comment was minimized by the moderator on the site
why not just normalize the length after the decimal instead of prefixing zeros after the decimal? e.g. 5.1 becomes 5.10,boom sorted?!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations