Formula

steveautsin99

New Member
Joined
Feb 3, 2011
Messages
27
Hi

Can u help with a formula which would show the current week and previous week.
For us week starts from saturday and ends on Friday.

For ex the current week should show as 26-Feb to 4-Mar
the prvious week should show as 19-Feb to 25-Feb

Excatly in the same format.

Thanks in advance
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
do you want to create a whole list of these, as you only need to create the first set and adjust by 7 days to generate the first set

did a bit of google and came up with the following, i am sure someone will come up with something shorter

in A1 type the following
=TODAY()+(WEEKDAY(TODAY())>=7)*7-WEEKDAY(TODAY())+7
in B1 type
=A1 + 7

in A2 type
=TODAY()-7+(WEEKDAY(TODAY()-7)>=7)*7-WEEKDAY(TODAY()-7)+7
in B2 type
=A2 + 7

format the cells accordingly to the date format you require
 
Upvote 0
It should show up as follows the current week and the precious week should be entirely in one single column


Yesterday
24-Feb-11


Current Week
02 October to 08 October


Previous Week
25 September to 01 October
 
Upvote 0
ok in single cell for current week try

=TEXT(TODAY()+(WEEKDAY(TODAY())>=7)*7-WEEKDAY(TODAY())+7,"dd mmm") & " to " & TEXT((TODAY()+(WEEKDAY(TODAY())>=7)*7-WEEKDAY(TODAY())+7)+6,"dd mmm")

and for the previous in next cell try

=TEXT(TODAY()-7+(WEEKDAY(TODAY()-7)>=7)*7-WEEKDAY(TODAY()-7)+7,"dd mmm") & " to " & TEXT((TODAY()-7+(WEEKDAY(TODAY()-7)>=7)*7-WEEKDAY(TODAY()-7)+7)+6,"dd mmm")

I am sure some bits will cancel out arithmetically but i will leave it as this for the moment
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,287
Members
452,902
Latest member
Knuddeluff

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