Converting a number to a date in a month

NightKnight

New Member
Joined
Sep 11, 2011
Messages
19
Office Version
  1. 2019
Platform
  1. MacOS
Hello.
Using Excel for Mac, ver 16.17 on a 15” 2019 MacBook Pro, with macOS Sequoia 15.2.
I created a column named “Date”.
I want to input a number in a cell in that column and that Excel automatically will convert it to the corresponding date in January 2025.
I formatted the cells to a custom “mm/dd” format, which works fine. For example, if I key in “7,” it “translates” to 01/07 (which is what I want), but when I tried to sort the data, I noticed that the whole date in the formula bar is “1/7/1900.” I tried to do the data validation to date between 1/1/2025 and 1/31/2025, but apparently, it has nothing to do with my purpose.

Thank you for any help.
 
When you don't provide the year, the date value becomes the default for your Excel version, but I would have thought that to be 1904, not 1900. Anyway if you cannot see the year when you enter the number, then sorting should not matter - unless your date sorting spans over years or perhaps months in your case. You only referred to January 2025 though. Maybe you should concatenate the current year to your calculation if those dates will span more than one year? Like Year(Now()).
 
Upvote 0
When you don't provide the year, the date value becomes the default for your Excel version, but I would have thought that to be 1904, not 1900. Anyway if you cannot see the year when you enter the number, then sorting should not matter - unless your date sorting spans over years or perhaps months in your case. You only referred to January 2025 though. Maybe you should concatenate the current year to your calculation if those dates will span more than one year? Like Year(Now()).
Thanks for your reply.
I think you are right, especially since my dates in the worksheet are only for the current month and if it writes 1900 it doesn't matter for the sorting.
 
Upvote 0

Forum statistics

Threads
1,226,839
Messages
6,193,266
Members
453,786
Latest member
ALMALV

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top