跳到主要內容

如何在Excel中按大寫小寫對行進行排序?

我們是否可以通過區分大小寫的方式對文本內容進行排序,這意味著首先對大寫字母進行排序,然後對小寫字母進行排序,然後對小寫字母進行排序,反之亦然? 例如,我有一個混合了大寫字母,大寫字母和小寫字母的名稱列表,如下面的屏幕截圖所示,在Excel中是否有按區分大小寫對列表進行排序的好方法?

doc-sort-case-1

使用助手列按大寫小寫對行進行排序


箭頭藍色右氣泡 使用助手列按大寫小寫對行進行排序

在Excel中,您可以應用公式來識別文本的大小寫,然後根據需要對其進行排序。 請執行以下步驟:

1。 在此示例中,將以下公式輸入到數據旁邊的空白單元格B2中:

= IF(EXACT(A2,UPPER(A2)),“大寫”,IF(EXACT(A2,LOWER(A2)),“小寫”,IF(EXACT(A2,PROPER(A2)),“大寫“,“其他”))),請參見屏幕截圖:

doc-sort-case-1

2. 然後將填充手柄拖到您要應用此公式的數據范圍上,文本案例已顯示為以下屏幕截圖:

doc-sort-case-1

3。 接下來,您可以根據列B對數據進行排序。選擇數據范圍A1:B11,然後單擊 數據 > 分類 分類 對話框中,在下面指定要排序的列名 部分,然後選擇 價值觀 來自 排序 部分,最後,根據需要選擇排序順序,請參見屏幕截圖:

doc-sort-case-1

注意: 如果您的數據有標題,請檢查 我的數據有標題 選項。

4。 然後點擊 OK 關閉對話框,並且您的單元格內容已按文本大小寫排序,如果您按A到Z對其進行排序,則首先是小寫,然後是大寫,最後是大寫,請參見屏幕截圖:

doc-sort-case-1

筆記:

1.完成對所需數據的排序後,可以根據需要刪除幫助器列B中的單元格內容。

2.如果要對行進行排序以將大寫字母放在首位,然後將大寫字母放在最後,將小寫字母放在後面,則只需在“排序”對話框中選擇從Z到A的排序順序。


相關文章:

如何在Excel中按文件擴展名排序?

如何在Excel中按字符長度對列列表進行排序?

如何按Excel中最頻繁的值對數據進行排序?

最佳辦公生產力工具

🤖 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 (4)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
You can also try this...1. Select the column you need to sort by2. Click 'Sort & Filter' on the 'Home' tab3. Make your selections in 'Sort by,' 'Sort On,' and 'Order'4. Click the 'Options' button5. Check the box next to 'Case sensitive,' and click 'OK'6. Click 'OK,' and the column you selected will sort by case sensitivity
This comment was minimized by the moderator on the site
I've tried running the formula listed, and it does not apply the logic tags properly. in some instances, it will give a different logic tag to multiple instances of the same data. example: SMITH, John "other" SMITH, John "upper" i have no idea on how to fix this. please advise.
This comment was minimized by the moderator on the site
If you have headings start with row 2 then A2 if you don't have headings then you are starting with row 1 so it will be A1 and so on...
This comment was minimized by the moderator on the site
Hey Danny, you will need to replace all A2 with A1 and enter the formula in the very first row, basically replace the number with the row number you are entering the formula in :)
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations