Forum Discussion
Olivier_Maltais
Oct 18, 2023Copper Contributor
Create an interval of date
Hello, I would like to have a formula to have a date interval. I want that the cell looks like this: 2023/12/31 to 2024/01/06 I would like to use a formula to set all the week of the year like this...
Riny_van_Eekelen
Oct 18, 2023Platinum Contributor
Olivier_Maltais If you are on a modern version of Excel you can use the formula below as demonstrated in the attached file.
=TEXT(SEQUENCE(52,,A1,7),"yyyy/mm/dd") & " to " & TEXT(SEQUENCE(52,,A1+6,7),"yyyy/mm/dd")
where A1 contains the first day of the sequence (in your case 2023/12/31).