跳到主要内容

如何仅在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 套用日期格式 实用程序仅从生日(日期)中提取月/年/日,然后您可以仅按月/年/日对生日(日期)进行排序。

Kutools for Excel - 使用 300 多种基本工具增强 Excel 功能。 享受全功能 30 天免费试用,无需信用卡! 立即行动吧!

1。 复制生日列,并粘贴到原始数据旁边。

2。 在新列中继续选择新的生日,然后单击 库工具 > 格式 > 套用日期格式。 现在,在打开的“应用日期格式”对话框中,请选择一个日期格式,然后单击 Ok 按钮。

在我们的情况下,我们选择日期格式,该格式仅将日期显示为月份。 您可以根据需要选择仅显示生日的年份或日期的日期格式。 看截图:
Exce插件:仅将日期显示为月份

3。 继续选择仅显示月份的生日,请单击 库工具 > 到实际和点击 主页 > 数字格式 > 总类 依次。

现在从所有生日中提取了几个月。 查看屏幕截图:

Kutools for Excel - 使用 300 多种基本工具增强 Excel 功能。 享受全功能 30 天免费试用,无需信用卡! 立即行动吧!

4。 继续选择生日月份,请点击 时间 > 最小到最大排序 or 排序最大到最小,然后在“排序警告”对话框中,选中 扩大选择 选项,然后单击 排序 按钮。 查看屏幕截图:
排序按钮    排序警告对话框
到目前为止,我们仅按月份对生日进行了排序(或仅按年/日进行了排序)。


仅使用 Kutools for Excel 按月或日对生日(日期)进行排序

上面的方法可能有点复杂,但是使用 高级排序 实用程序 Kutools for Excel,您可以直接根据月份对日期进行排序。

Kutools for Excel - 使用 300 多种基本工具增强 Excel 功能。 享受全功能 30 天免费试用,无需信用卡! 立即行动吧!

1。 选择要按月对日期排序的列表,然后单击 Kutools 加 > 高级排序。 看截图:

2.然后在 高级排序 对话框,选择生日列,然后选择 (或 )从 排序 下拉列表,然后单击确定按钮。 看截图:
Excel插件:按文本长度,姓氏,绝对值,邮件域,频率,星期等排序。

现在,您可以看到生日仅按月份(或日期)排序。 看截图:

Kutools for Excel - 使用 300 多种基本工具增强 Excel 功能。 享受全功能 30 天免费试用,无需信用卡! 立即行动吧!


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


Kutools for Excel:超过 300 个方便的工具触手可及! 立即开始 30 天免费试用,没有任何功能限制。 立即下载!

相关文章:

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 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