跳到主要內容

如何僅在Excel中按月/年/日對生日(日期)進行排序?

通常,日期首先按年份排序,然後按月份排序,最後按Excel中的日期排序,並且似乎很難僅按月份對日期進行排序而忽略年份,即使月份的開頭是格式化的,例如12年2011月XNUMX日。但是,有時它可能會在發送生日賀卡或其他原因時要求按月對生日進行排序。 本文將向您展示一些技巧,這些技巧可以在Excel中快速按月對生日(日期)進行排序。


僅使用Excel函數按月/年/日對生日(日期)進行排序

Excel的“月份”功能可以幫助您從日期中提取月份,然後按月份和年份對它們進行快速排序。 請執行以下操作:

1。 在日期的相鄰空白單元格(例如單元格C1)中,輸入公式 =月(B2),然後根據需要將該單元格的“自動填充手柄”向下拖動到該範圍。 幾個月是從生日中提取的。 看截圖:

筆記:
(1)僅按年份排序,請應用此公式 =年(B2);
(2)僅適用於按天排序,請應用此公式 = DAY(B2).
(3)您也可以應用公式 = TEXT(B2,“ MMDD”) 從生日中提取月份和日期。

2。 繼續選擇這些月份,然後單擊 數據 > 最小到最大排序 or 排序最大到最小。
排序按鈕

3。 在打開的“排序警告”對話框中,請檢查 擴大選擇 選項,然後單擊 分類 按鈕。
排序警告對話框

現在,日期一次僅按月份(或僅按年份/天)排序。 然後,您可以根據需要刪除帶有月份的新列。
僅按月份排序


僅使用Kutools for Excel按月/年/日對生日(日期)進行排序

除了Excel函數,您還可以將Kutools for Excel的 套用日期格式 實用程序僅從生日(日期)中提取月/年/日,然後您可以僅按月/年/日對生日(日期)進行排序。

Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!

1。 複製生日列,並粘貼到原始數據旁邊。

2。 在新列中繼續選擇新的生日,然後單擊 庫工具 > 格式 > 套用日期格式。 現在,在打開的“應用日期格式”對話框中,請選擇一個日期格式,然後單擊 Ok 按鈕。

在本例中,我們選擇日期格式,該格式僅將日期顯示為月份。 您可以根據需要選擇只顯示生日的年份或日期的日期格式。 看截圖:
Exce插件:僅將日期顯示為月份

3。 繼續選擇僅顯示月份的生日,請單擊 庫工具 > 到實際,然後點擊 首頁 > 數字格式 > 依次。

現在從所有生日中提取了幾個月。 查看屏幕截圖:

Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!

4。 繼續選擇生日月份,請點擊 數據 > 最小到最大排序 or 排序最大到最小,然後在“排序警告”對話框中,選中 擴大選擇 選項,然後單擊 分類 按鈕。 查看屏幕截圖:
排序按鈕    排序警告對話框
到目前為止,我們僅按月份(或僅按年份/天)對生日進行了排序。


僅使用Kutools for Excel按月或日對生日(日期)進行排序

上面的方法可能有點複雜,但是使用 高級排序 的效用 Excel的Kutools,您可以直接根據月份對日期進行排序。

Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!

1。 選擇要按月對日期排序的列表,然後單擊 Kutools 加 > 高級排序。 看截圖:

2.然後在 高級排序 對話框,選擇生日列,然後選擇 每月 ) 來自 排序 下拉列表,然後單擊確定按鈕。 看截圖:
Excel插件:按文本長度,姓氏,絕對值,郵件域,頻率,星期等排序。

現在,您可以看到生日僅按月份(或日期)排序。 看截圖:

Excel的Kutools - 使用 300 多種基本工具增強 Excel 功能。 享受全功能 30 天免費試用,無需信用卡! 立即行動吧!


演示:在Excel中按月/年/日對生日(日期)進行排序


Excel的Kutools:超過 300 個方便的工具觸手可及! 立即開始 30 天免費試用,沒有任何功能限制。 現在就下載!

相關文章:

最佳辦公生產力工具

🤖 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 (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This was so simple and clever. Really helpful. I was going to sort all 500 dates manually to sort by month until I came across this post. Thank you.
This comment was minimized by the moderator on the site
What if we have month and day in two separated collumns?
This comment was minimized by the moderator on the site
Very helpful... thank you very much
This comment was minimized by the moderator on the site
Thank that helps me.
This comment was minimized by the moderator on the site
I would like to sort a column in Excel by birth day and month. No year is necessary. Like this: 1-Jan 10-Feb 28-Mar I've tried all that I know, based on the Excel I'm using. I get a sort but some are jumbled out of order.
This comment was minimized by the moderator on the site
I'm not the best with excel and other walk-throughs were not nearly as thorough as this one! Thank you, thank you, thank you! This was just what i was looking for!
This comment was minimized by the moderator on the site
I like to think I'm pretty computer literate but I've been trying to figure this out forever. THANK YOU SO MUCH, worked like a charm!
This comment was minimized by the moderator on the site
This is EXACTLY what I was looking for! I've tried to do this several different ways, and they always get too complex, but this was perfect! I used the Text option (the middle one of the options on this page) and it was exactly what I needed. Thank you for sharing this!!!
This comment was minimized by the moderator on the site
How do I sort for birthdays in the English date format? day month year?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations