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'
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

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.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,088
Messages
5,599,664
Members
414,325
Latest member
kfg1287

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