Is there a way to make the date in a cell check the current date then fall back to the previous sunday unless today actually happens to be sunday? So for example it would look at today and make the date 12/9/2007 rather than 12/14/2007
Is there a way to make the date in a cell check the current date then fall back to the previous sunday unless today actually happens to be sunday? So for example it would look at today and make the date 12/9/2007 rather than 12/14/2007
=today()-weekday(today())+1
Please Read Forum Rules Before Posting
Wrap VBA code by selecting the code and clicking the # icon or Read This
How To Cross Post politely
Top Excel links for beginners to Experts
If you are pleased with a member's answer then use the Scales icon to rate it
If my reply has assistedor failed to assist you
I welcome your Feedback.
That works perfectly, thank you very much.![]()
How would I correct the formula so that the cell would always present the date as the next Sunday unless it is Sunday? I'm trying on my own but I'm a bit of a newbie...
Last edited by Superhatch; 12-17-2007 at 11:18 AM.
=TODAY()+WEEKDAY(TODAY())+4 works for this week, but I'm not sure why, or if it will work for next week, any correction or explanation would be greatly appreciated.
Try this,
=TODAY()+7-WEEKDAY(TODAY())+1
oldchippy
-------------
![]()
![]()
Blessed are those who can give without remembering and take without forgetting
If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.
Click here >>> Top Excel links for beginners to Experts
Forum Rules >>>Please don't forget to read these
I did a litte research, and found how weekday, and dates work. So that formula makes sense to me nowThanks much for the help!!
=TODAY()+7-WEEKDAY(TODAY())+1
Just for clarification...if I calculate out this coming Sunday..the formula would be 23rd+7=30-1+1...that would equal the 30th. I've read about how excel serializes Sunday-Saturday as 1-7, but if you add the today # on a Sunday you get the 30th which would be the following Sunday. Does (TODAY()) compensate for that somehow?
If the day is Sunday and you want this Sunday then
=IF(WEEKDAY(TODAY())=1,TODAY(),TODAY()+7-WEEKDAY(TODAY())+1)
A small variation to oldchippy's formula
=IF(WEEKDAY(TODAY())=1,TODAY(),TODAY()-WEEKDAY(TODAY())+8)
This is close....just change toOriginally Posted by Superhatch
=TODAY()+7-WEEKDAY(TODAY()-1)
daddylonglegs
Thats much neater than using If
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks