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  

Determining the Sunday date of the third "full" weekend of a month



 
 
Thread Tools Display Modes
  #11  
Old September 8th, 2009, 08:31 AM posted to microsoft.public.excel.worksheet.functions
[email protected]
external usenet poster
 
Posts: 30
Default Determining the Sunday date of the third "full" weekend of a m

Even shorter

=23-WEEKDAY(DATE(B13,A13,1),1)

Alan Lloyd
  #12  
Old September 8th, 2009, 08:52 AM posted to microsoft.public.excel.worksheet.functions
Rick Rothstein[_2_]
external usenet poster
 
Posts: 2,013
Default Determining the Sunday date of the third "full" weekend of a m

I was under the impression the OP wanted the date for the 3rd full Sunday of
the month, not the day number.

--
Rick (MVP - Excel)


wrote in message
...
Even shorter

=23-WEEKDAY(DATE(B13,A13,1),1)

Alan Lloyd


  #13  
Old September 8th, 2009, 09:24 AM posted to microsoft.public.excel.worksheet.functions
[email protected]
external usenet poster
 
Posts: 30
Default Determining the Sunday date of the third "full" weekend of a m

On Sep 8, 8:52�am, "Rick Rothstein"
wrote:
I was under the impression the OP wanted the date for the 3rd full Sunday of
the month, not the day number.

OOOPPPSSS - you're quite right g

Mine should be . . .

=DATE(B13,A13,23-WEEKDAY(DATE(B13,A13,1),1))

Much the same as Jacob's

Alan Lloyd
  #14  
Old September 8th, 2009, 11:53 AM posted to microsoft.public.excel.worksheet.functions
Bob
external usenet poster
 
Posts: 1,351
Default Determining the Sunday date of the third "full" weekend of a m

Rick,
Thanks for your help. I really appreciate it.
Bob


"Rick Rothstein" wrote:

Here is a shorter version...

=DATE(B1,A1,22)-WEEKDAY(DATE(B1,A1,7))+7*(WEEKDAY(DATE(B1,A1,1))=1 )

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
Give this formula a try...

=DATE(B1,A1,22)-WEEKDAY(DATE(B1,A1,7))+7*(DAY(DATE(B1,A1,8)-WEEKDAY(DATE(B1,A1,7)))=1)

--
Rick (MVP - Excel)


"Bob" wrote in message
...
For a given month number (in column A) and year (in column B), I need to
determine the Sunday date of the third "full" weekend. A "full" weekend
is
defined as one in which a Saturday and Sunday occur within the same month
(i.e., Saturday and Sunday do NOT straddle two months).

For example, the Sunday date of the third "full" weekend in November 2009
is
November 22, whereas the Sunday date of the third "full" weekend in
December
2009 is December 20.

I would greatly appreciate any help in coming up with the formula (and
worksheet function) that will accurately and consistently determine the
Sunday date of the third "full" weekend of a month.

Thanks,
Bob




  #15  
Old September 8th, 2009, 11:56 AM posted to microsoft.public.excel.worksheet.functions
Bob
external usenet poster
 
Posts: 1,351
Default Determining the Sunday date of the third "full" weekend of a m

Jacob,
Thanks for your elegant and concise formula!
Bob


"Jacob Skaria" wrote:

Oops.. correction..
=DATE(B1,A1,22)-WEEKDAY(DATE(B1,A1,1))+1


If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Another one (a bit shorter)

=DATE(B1,A1,22)-WEEKDAY(DATE(YEAR(A1),MONTH(A1),1))+1

If this post helps click Yes
---------------
Jacob Skaria


"Bob" wrote:

For a given month number (in column A) and year (in column B), I need to
determine the Sunday date of the third "full" weekend. A "full" weekend is
defined as one in which a Saturday and Sunday occur within the same month
(i.e., Saturday and Sunday do NOT straddle two months).

For example, the Sunday date of the third "full" weekend in November 2009 is
November 22, whereas the Sunday date of the third "full" weekend in December
2009 is December 20.

I would greatly appreciate any help in coming up with the formula (and
worksheet function) that will accurately and consistently determine the
Sunday date of the third "full" weekend of a month.

Thanks,
Bob

  #16  
Old September 8th, 2009, 03:04 PM posted to microsoft.public.excel.worksheet.functions
Bernd P
external usenet poster
 
Posts: 613
Default Determining the Sunday date of the third "full" weekend of amonth

Hello,

I suggest
=FLOOR(DATE(B1,A1,21),7)+1

Regards,
Bernd
  #17  
Old September 8th, 2009, 05:19 PM posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default Determining the Sunday date of the third "full" weekend of a month

On Mon, 7 Sep 2009 20:24:01 -0700, Bob wrote:

For a given month number (in column A) and year (in column B), I need to
determine the Sunday date of the third "full" weekend. A "full" weekend is
defined as one in which a Saturday and Sunday occur within the same month
(i.e., Saturday and Sunday do NOT straddle two months).

For example, the Sunday date of the third "full" weekend in November 2009 is
November 22, whereas the Sunday date of the third "full" weekend in December
2009 is December 20.

I would greatly appreciate any help in coming up with the formula (and
worksheet function) that will accurately and consistently determine the
Sunday date of the third "full" weekend of a month.

Thanks,
Bob


With some date in the month of interest in A1:

=A1-DAY(A1)+23-WEEKDAY(A1-DAY(A1)+1)

--ron
  #18  
Old September 8th, 2009, 05:32 PM posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
external usenet poster
 
Posts: 3,719
Default Determining the Sunday date of the third "full" weekend of a month

On Mon, 7 Sep 2009 20:24:01 -0700, Bob wrote:

For a given month number (in column A) and year (in column B), I need to
determine the Sunday date of the third "full" weekend. A "full" weekend is
defined as one in which a Saturday and Sunday occur within the same month
(i.e., Saturday and Sunday do NOT straddle two months).

For example, the Sunday date of the third "full" weekend in November 2009 is
November 22, whereas the Sunday date of the third "full" weekend in December
2009 is December 20.

I would greatly appreciate any help in coming up with the formula (and
worksheet function) that will accurately and consistently determine the
Sunday date of the third "full" weekend of a month.

Thanks,
Bob


If you must have the month number in A1 and the year in B1, then:

=DATE(B1,A1,23)-WEEKDAY(DATE(B1,A1,1))

--ron
  #19  
Old September 9th, 2009, 01:27 AM posted to microsoft.public.excel.worksheet.functions
Bob
external usenet poster
 
Posts: 1,351
Default Determining the Sunday date of the third "full" weekend of a m

Ron,
Thanks for your help. I greatly appreciate it.
Bob


"Ron Rosenfeld" wrote:

On Mon, 7 Sep 2009 20:24:01 -0700, Bob wrote:

For a given month number (in column A) and year (in column B), I need to
determine the Sunday date of the third "full" weekend. A "full" weekend is
defined as one in which a Saturday and Sunday occur within the same month
(i.e., Saturday and Sunday do NOT straddle two months).

For example, the Sunday date of the third "full" weekend in November 2009 is
November 22, whereas the Sunday date of the third "full" weekend in December
2009 is December 20.

I would greatly appreciate any help in coming up with the formula (and
worksheet function) that will accurately and consistently determine the
Sunday date of the third "full" weekend of a month.

Thanks,
Bob


If you must have the month number in A1 and the year in B1, then:

=DATE(B1,A1,23)-WEEKDAY(DATE(B1,A1,1))

--ron

  #20  
Old September 9th, 2009, 02:04 AM posted to microsoft.public.excel.worksheet.functions
Bob
external usenet poster
 
Posts: 1,351
Default Determining the Sunday date of the third "full" weekend of a m

Wow! What a great formula!

While I understand how the FLOOR function works in general, I can't seem to
figure out how it works when used with a date, as in your formula.

Thanks for your help.

Regards,
Bob


"Bernd P" wrote:

Hello,

I suggest
=FLOOR(DATE(B1,A1,21),7)+1

Regards,
Bernd

 




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 05:08 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.