Working with Dates in Excel

manishseth

New Member
Joined
Jul 26, 2018
Messages
1
On the heading of my weekly report I wanted the week start date "Saturday" and the end date "Friday" should show automatically when I open the sheet and should change with the date of the month automatically. I did not want to change it manually every week. I achieved the same by the below formula.

My Question: Is there any smarter way to get the same results?

Result: 21-07-18 to 28-07-18

Formula: =TEXT(IF(WEEKDAY(TODAY())=7,TODAY(),TODAY()-WEEKDAY(TODAY())),"DD-mm-YY")&" to "&TEXT(IF(WEEKDAY(TODAY())=7,TODAY()+(WEEKDAY(TODAY())),TODAY()+(6-WEEKDAY(TODAY()))),"DD-MM-YY")
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Not much shorter.

=TEXT(TODAY()-MOD(WEEKDAY(TODAY()),7),"dd-mm-yy") &" to "&TEXT(TODAY()-MOD(WEEKDAY(TODAY()),7)+7, "dd-mm-yy")
 
Upvote 0
A shorter formula:

=TEXT(INT(TODAY()/7)*7,"dd-mm-yy to ")&TEXT(INT(TODAY()/7)*7+6,"dd-mm-yy")

If your version of Excel has TEXTJOIN, here is an even shorter one:

=TEXTJOIN(" to ",,TEXT(INT(TODAY()/7)*7+{0,6},"dd-mm-yy"))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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