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  

days of the week formulas



 
 
Thread Tools Display Modes
  #21  
Old March 7th, 2008, 07:48 PM posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default days of the week formulas

On Fri, 7 Mar 2008 11:03:00 -0800, Bob wrote:

the beginning of the month would start as the formula states (first Monday of
a calendar month. The previous month ends the Sunday before that date.

February ended on Sunday, March 2 and March began on Monday, March 3.

March ends on Sunday April 6 and April begins Monday April 7.


Those rules are different from your original rules.

In one of your original examples, you indicated the start of May would be April
28. But the first Monday of the calendar Month May is May 5.

If you want to use these rules, you need different formulas:

Again, with some date in the required calendar month in column A

Beginning: =A2-DAY(A2)+8-WEEKDAY(A2-DAY(A2)+6)

End:

=DATE(YEAR(A2),MONTH(A2)+1,7)-WEEKDAY(DATE(YEAR(A2),MONTH(A2)+1,6))
--ron
  #22  
Old March 7th, 2008, 09:16 PM posted to microsoft.public.excel.worksheet.functions
Bob
external usenet poster
 
Posts: 1,351
Default days of the week formulas

Right. Thank you.

"Ron Rosenfeld" wrote:

On Fri, 7 Mar 2008 11:03:00 -0800, Bob wrote:

the beginning of the month would start as the formula states (first Monday of
a calendar month. The previous month ends the Sunday before that date.

February ended on Sunday, March 2 and March began on Monday, March 3.

March ends on Sunday April 6 and April begins Monday April 7.


Those rules are different from your original rules.

In one of your original examples, you indicated the start of May would be April
28. But the first Monday of the calendar Month May is May 5.

If you want to use these rules, you need different formulas:

Again, with some date in the required calendar month in column A

Beginning: =A2-DAY(A2)+8-WEEKDAY(A2-DAY(A2)+6)

End:

=DATE(YEAR(A2),MONTH(A2)+1,7)-WEEKDAY(DATE(YEAR(A2),MONTH(A2)+1,6))
--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 02:06 AM.


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