Week Of Formula

Ima_learnin'

Active Member
Joined
Dec 14, 2002
Messages
266
Hello All,
I have a cell with =TODAY()...In another cell I need a formula that always gives me the date of the sunday before whatever today is.

As always thanks, Ima Learnin'
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
longer, but another route through an if fx:
=IF(WEEKDAY(TODAY())>=1,(TODAY()-WEEKDAY(TODAY()-1))-7,TODAY())
 

Ima_learnin'

Active Member
Joined
Dec 14, 2002
Messages
266
You guys are incredible!

Zack, your formula returned 2/1/04 instead of 2/8/04?

Thanks,Ima Learnin'
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web

ADVERTISEMENT

Re: week of formula

sorry about the confustion, my bad, try this:
=TODAY()-WEEKDAY(TODAY())-6

edit: substitute today() for date of choosing to test.
 

rrdonutz

Well-known Member
Joined
Jan 15, 2003
Messages
564
Originally posted by north19701:
=TODAY()-MOD(TODAY()-1,7)
The above will return the date of the previous Sunday, unless today is Sunday, in which case it will return today's (current) date. The following also works, except that it always returns the date of the previous Sunday:

=TODAY()-WEEKDAY(TODAY()-1)

Also, for any date in cell A1:

=A1-WEEKDAY(A1-1)

will return the date of the previous Sunday.
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web

ADVERTISEMENT

rrdonutz said:
The following also works, except that it always returns the date of the previous Sunday:

=TODAY()-WEEKDAY(TODAY()-1)...

i could only get it to return the previous friday...can you check??
 

rrdonutz

Well-known Member
Joined
Jan 15, 2003
Messages
564

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
thanks!

i don't know what i did, but it threw me for a doosy! i see what i did (as i'm sure so does everyone else :oops: ). i was the one with the friday! i bet i sounded like a hipocrit (spelling??). so i apologize.

Yogi, thanks!
Tom, thanks! and sorry for the confusion there.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,037
Messages
5,856,967
Members
431,843
Latest member
Malahhai

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
Top