A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Monday closest to today's date?



 
 
Thread Tools Display Modes
  #1  
Old March 16th, 2010, 02:50 PM posted to microsoft.public.excel.worksheet.functions
Ted[_15_]
external usenet poster
 
Posts: 10
Default Monday closest to today's date?

Hello:

I am seeking a formula that would return the date of the closest Monday to
today's date. The monday would have to be the first one in the future, not
the past. So today, Tuesday March 16, 2010, the formula would return
Monday, March 22, 2010

Thanks in advance

  #2  
Old March 16th, 2010, 03:02 PM posted to microsoft.public.excel.worksheet.functions
zxcv[_2_]
external usenet poster
 
Posts: 9
Default Monday closest to today's date?

On Mar 16, 9:50*am, "Ted" wrote:
Hello:

I am seeking a formula that would return the date of the closest Monday to
today's date. *The monday would have to be the first one in the future, not
the past. *So today, Tuesday March 16, 2010, the formula would return
Monday, March 22, 2010

Thanks in advance


How about this?

=DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())+7-WEEKDAY(TODAY(),3))
  #3  
Old March 16th, 2010, 03:07 PM posted to microsoft.public.excel.worksheet.functions
Luke M[_4_]
external usenet poster
 
Posts: 451
Default Monday closest to today's date?

If today is Monday, do you want today's date or next week?
former:
=TODAY()+CHOOSE(WEEKDAY(TODAY()),1,0,6,5,4,3,2)
latter:
=TODAY()+CHOOSE(WEEKDAY(TODAY()),1,7,6,5,4,3,2)
--
Best Regards,

Luke M
"Ted" wrote in message
...
Hello:

I am seeking a formula that would return the date of the closest Monday to
today's date. The monday would have to be the first one in the future,
not the past. So today, Tuesday March 16, 2010, the formula would return
Monday, March 22, 2010

Thanks in advance



  #4  
Old March 16th, 2010, 03:19 PM posted to microsoft.public.excel.worksheet.functions
Ted[_15_]
external usenet poster
 
Posts: 10
Default Monday closest to today's date?

Thank you;

While I did not say so, I need to do the same for each day of the week. If
I change the '3' in the formula to 1, it returns Saturday, March 20. Change
it to 2 and it returns Sunday March 21. That is good. But if I change it
to 4, in the hopes it will return Tuesday, March 23, I get an error. Same
if I change it to 6 in the hopes it returns Thursday, March 18.


What am I missing?

Thanks again.

"zxcv" wrote in message
...
On Mar 16, 9:50 am, "Ted" wrote:
Hello:

I am seeking a formula that would return the date of the closest Monday
to
today's date. The monday would have to be the first one in the future,
not
the past. So today, Tuesday March 16, 2010, the formula would return
Monday, March 22, 2010

Thanks in advance


How about this?

=DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())+7-WEEKDAY(TODAY(),3))


  #5  
Old March 16th, 2010, 03:35 PM posted to microsoft.public.excel.worksheet.functions
Luke M[_4_]
external usenet poster
 
Posts: 451
Default Monday closest to today's date?

You should look up how the WEEKDAY function works. The last arguement can
not be changed arbitrarily.. If you're wanting a different day, something
like:
=TODAY()+7-WEEKDAY(TODAY(),3)

If you're wanting a different day, decrease the 7.
6 - Sunday 3/21
5 - Sat 3/20
4 - Fri 3/19

--
Best Regards,

Luke M
"Ted" wrote in message
...
Thank you;

While I did not say so, I need to do the same for each day of the week.
If I change the '3' in the formula to 1, it returns Saturday, March 20.
Change it to 2 and it returns Sunday March 21. That is good. But if I
change it to 4, in the hopes it will return Tuesday, March 23, I get an
error. Same if I change it to 6 in the hopes it returns Thursday, March
18.


What am I missing?

Thanks again.

"zxcv" wrote in message
...
On Mar 16, 9:50 am, "Ted" wrote:
Hello:

I am seeking a formula that would return the date of the closest Monday
to
today's date. The monday would have to be the first one in the future,
not
the past. So today, Tuesday March 16, 2010, the formula would return
Monday, March 22, 2010

Thanks in advance


How about this?

=DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())+7-WEEKDAY(TODAY(),3))




  #6  
Old March 19th, 2010, 08:00 PM posted to microsoft.public.excel.worksheet.functions
Ted[_15_]
external usenet poster
 
Posts: 10
Default Monday closest to today's date?

This worked great. Thanks everyone for your help.

"Luke M" wrote in message
...
If today is Monday, do you want today's date or next week?
former:
=TODAY()+CHOOSE(WEEKDAY(TODAY()),1,0,6,5,4,3,2)
latter:
=TODAY()+CHOOSE(WEEKDAY(TODAY()),1,7,6,5,4,3,2)
--
Best Regards,

Luke M
"Ted" wrote in message
...
Hello:

I am seeking a formula that would return the date of the closest Monday
to today's date. The monday would have to be the first one in the
future, not the past. So today, Tuesday March 16, 2010, the formula
would return Monday, March 22, 2010

Thanks in advance



  #7  
Old March 19th, 2010, 08:41 PM posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default Monday closest to today's date?

On Tue, 16 Mar 2010 08:50:26 -0500, "Ted" wrote:

Hello:

I am seeking a formula that would return the date of the closest Monday to
today's date. The monday would have to be the first one in the future, not
the past. So today, Tuesday March 16, 2010, the formula would return
Monday, March 22, 2010

Thanks in advance


To always return the NEXT Monday (even if today is a Monday)

=A1+8-WEEKDAY(A1+6)

or, more generally:

=A1+8-WEEKDAY(A1+8-DOW)

DOW: 1=Sun, 2=Mon, etc.

To return the NEXT Monday EXCEPT if today is a Monday:

=A1+7-WEEKDAY(A1+5)

or

=A1+7-WEEKDAY(A1+7-DOW)
--ron
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.