Forum Discussion
Potential bug in Excel
- Apr 12, 2023
The date 1/4/1900 is the default date format for Excel.
When you enter a formula that returns a number, such as WEEKDAY(TODAY(), 1), Excel may automatically format the cell as a date and display the result as a date.
Since the WEEKDAY function returns a number between 1 and 7, Excel interprets this as the number of days since January 0, 1900 (which is the default starting date for Excel), and displays the result as a date in January 1900.
The WEEKDAY function returns a number representing the day of the week for a given date. The TODAY function returns the current date.
So, WEEKDAY(TODAY(), 1) returns a number representing the day of the week for today’s date.
To get the date of the first day of the current week, you can use a formula like this:
=TODAY()-WEEKDAY(TODAY(),2)+1.
This formula subtracts the weekday number from today’s date and adds 1 to get the date of the first day of the current week (assuming that the week starts on Monday).
I hope this helps!
I know I don't know anything (Socrates)
The date 1/4/1900 is the default date format for Excel.
When you enter a formula that returns a number, such as WEEKDAY(TODAY(), 1), Excel may automatically format the cell as a date and display the result as a date.
Since the WEEKDAY function returns a number between 1 and 7, Excel interprets this as the number of days since January 0, 1900 (which is the default starting date for Excel), and displays the result as a date in January 1900.
The WEEKDAY function returns a number representing the day of the week for a given date. The TODAY function returns the current date.
So, WEEKDAY(TODAY(), 1) returns a number representing the day of the week for today’s date.
To get the date of the first day of the current week, you can use a formula like this:
=TODAY()-WEEKDAY(TODAY(),2)+1.
This formula subtracts the weekday number from today’s date and adds 1 to get the date of the first day of the current week (assuming that the week starts on Monday).
I hope this helps!
I know I don't know anything (Socrates)
- cowboybizzOct 29, 2024Copper Contributor
Once I enter the formula in a cell for the current week. How do I lock in the date when I add a new(copy) sheet. The following week will show the new week's date, but I want to keep the date the same as the date I created it. NikolinoDE
- HansVogelaarOct 29, 2024MVP
Select the cell with the formula.
Copy it, then click the lower half of the Paste button on the Home tab of the ribbon. and select Values.
This will replace the formula with its result.
- trunimoserApr 12, 2023Copper Contributor