Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
lsmft
 
Posts: n/a
Default # of Sundays in a year


I've noticed that there are 53 Sundays in this year 2006.
My question:
Is there a way for Excel to determine how many Sundays or any other day
of the week that there is in a year?
Also:
Can Excel tell how often there will be 53 Sundays in a year?


--
lsmft
------------------------------------------------------------------------
lsmft's Profile: http://www.excelforum.com/member.php...o&userid=30678
View this thread: http://www.excelforum.com/showthread...hreadid=536328

  #2   Report Post  
Posted to microsoft.public.excel.misc
xlbo
 
Posts: n/a
Default # of Sundays in a year

The simple answer is that only the 1st weekday of the year will have 53
occurances in that year - all others will have 52, except on LEap Years where
the 1st 2 days will be repeated 53 times

to find the weekday for the 1st of Jan, simply enter the date and format it
as dddd

=if(text(A1,"dddd") = "Sunday", "There will be 53 Sundays this year","There
will be 52 Sundays this year")

where the 1st of Jan test is in A1

--
Rgds, Geoff

"A crash reduces
Your expensive computer
To a simple stone"


"lsmft" wrote:


I've noticed that there are 53 Sundays in this year 2006.
My question:
Is there a way for Excel to determine how many Sundays or any other day
of the week that there is in a year?
Also:
Can Excel tell how often there will be 53 Sundays in a year?


--
lsmft
------------------------------------------------------------------------
lsmft's Profile: http://www.excelforum.com/member.php...o&userid=30678
View this thread: http://www.excelforum.com/showthread...hreadid=536328


  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default # of Sundays in a year

Nice approach, couldn't resist completing it :-)

="There will be
"&(52+(OR(WEEKDAY(DATE(YEAR(A1),1,1))=1,AND(MONTH( DATE(YEAR(A1),2,29))=2,WEE
KDAY(DATE(YEAR(A1),1,2))=1))))&" Sundays this year"

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"xlbo" wrote in message
...
The simple answer is that only the 1st weekday of the year will have 53
occurances in that year - all others will have 52, except on LEap Years

where
the 1st 2 days will be repeated 53 times

to find the weekday for the 1st of Jan, simply enter the date and format

it
as dddd

=if(text(A1,"dddd") = "Sunday", "There will be 53 Sundays this

year","There
will be 52 Sundays this year")

where the 1st of Jan test is in A1

--
Rgds, Geoff

"A crash reduces
Your expensive computer
To a simple stone"


"lsmft" wrote:


I've noticed that there are 53 Sundays in this year 2006.
My question:
Is there a way for Excel to determine how many Sundays or any other day
of the week that there is in a year?
Also:
Can Excel tell how often there will be 53 Sundays in a year?


--
lsmft
------------------------------------------------------------------------
lsmft's Profile:

http://www.excelforum.com/member.php...o&userid=30678
View this thread:

http://www.excelforum.com/showthread...hreadid=536328




  #4   Report Post  
Posted to microsoft.public.excel.misc
Dana DeLouis
 
Posts: n/a
Default # of Sundays in a year

(52+(OR(WEEKDAY(DATE(YEAR(A1),1,1))=1,AND(MONTH(DA TE(YEAR(A1),2,29))=2,WEEKDAY(DATE(YEAR(A1),1,2))=1 ))))

Just another option along this same line might be this array formula:

=52+OR(WEEKDAY(DATE(A1,1,1))*MONTH(DATE(A1,2,29))= {2,3,14})
--
Dana DeLouis
Windows XP, Office 2003


"Bob Phillips" wrote in message
...
Nice approach, couldn't resist completing it :-)

="There will be
"&(52+(OR(WEEKDAY(DATE(YEAR(A1),1,1))=1,AND(MONTH( DATE(YEAR(A1),2,29))=2,WEE
KDAY(DATE(YEAR(A1),1,2))=1))))&" Sundays this year"

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"xlbo" wrote in message
...
The simple answer is that only the 1st weekday of the year will have 53
occurances in that year - all others will have 52, except on LEap Years

where
the 1st 2 days will be repeated 53 times

to find the weekday for the 1st of Jan, simply enter the date and format

it
as dddd

=if(text(A1,"dddd") = "Sunday", "There will be 53 Sundays this

year","There
will be 52 Sundays this year")

where the 1st of Jan test is in A1

--
Rgds, Geoff

"A crash reduces
Your expensive computer
To a simple stone"


"lsmft" wrote:


I've noticed that there are 53 Sundays in this year 2006.
My question:
Is there a way for Excel to determine how many Sundays or any other day
of the week that there is in a year?
Also:
Can Excel tell how often there will be 53 Sundays in a year?


--
lsmft
------------------------------------------------------------------------
lsmft's Profile:

http://www.excelforum.com/member.php...o&userid=30678
View this thread:

http://www.excelforum.com/showthread...hreadid=536328






  #5   Report Post  
Posted to microsoft.public.excel.misc
lsmft
 
Posts: n/a
Default # of Sundays in a year


Thank you for all of your help. Once again, the impossible seems to
become possible at this website.


--
lsmft
------------------------------------------------------------------------
lsmft's Profile: http://www.excelforum.com/member.php...o&userid=30678
View this thread: http://www.excelforum.com/showthread...hreadid=536328



  #6   Report Post  
Posted to microsoft.public.excel.misc
Dana DeLouis
 
Posts: n/a
Default # of Sundays in a year

A more general method to generate the 14 unique calendars might be something
like this:
=2*WEEKDAY(DATE(A2,1,1))+MONTH(DATE(A2,2,29))
(numbered: 4,5,6,...17)

Calendars that have 53 Sundays are {4,5,16}
=52+OR(2*WEEKDAY(DATE(A2,1,1))+MONTH(DATE(A2,2,29) )={4,5,16})

Calendars that have 53 Wednesdays are {8,10,11}
=52+OR(2*WEEKDAY(DATE(A2,1,1))+MONTH(DATE(A2,2,29) )={8,10,11})

Monday: {4,6,7}
Tuesday: {6,8,9}
Thursday: {10,12,13}
Friday:{12,14,15}
Saturday: {14,16,17}

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"lsmft" wrote in
message ...

Thank you for all of your help. Once again, the impossible seems to
become possible at this website.


--
lsmft
------------------------------------------------------------------------
lsmft's Profile:
http://www.excelforum.com/member.php...o&userid=30678
View this thread: http://www.excelforum.com/showthread...hreadid=536328



  #7   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten
 
Posts: n/a
Default # of Sundays in a year

I used a formula from Chip Person's site, http://www.cpearson.com/excel/DateTimeWS.htm#NthDoWYear

With the year in A1:

=IF(YEAR(DATE(A1,1,1+((53-(1=WEEKDAY(DATE(A1,1,1))))*7)+(1-WEEKDAY(DATE(A1,1,1)))))=A1,53,52)

This formula works for leap years as well.

--
Kind regards,

Niek Otten

"lsmft" wrote in message
...
|
| I've noticed that there are 53 Sundays in this year 2006.
| My question:
| Is there a way for Excel to determine how many Sundays or any other day
| of the week that there is in a year?
| Also:
| Can Excel tell how often there will be 53 Sundays in a year?
|
|
| --
| lsmft
| ------------------------------------------------------------------------
| lsmft's Profile: http://www.excelforum.com/member.php...o&userid=30678
| View this thread: http://www.excelforum.com/showthread...hreadid=536328
|


  #8   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default # of Sundays in a year

I can't get that to work yet Niek, but here is another one

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(DATE(YEAR(A1),1,1)&":"&DATE( YEAR(A1)+1,1
,0))))=1))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Niek Otten" wrote in message
...
I used a formula from Chip Person's site,

http://www.cpearson.com/excel/DateTimeWS.htm#NthDoWYear

With the year in A1:


=IF(YEAR(DATE(A1,1,1+((53-(1=WEEKDAY(DATE(A1,1,1))))*7)+(1-WEEKDAY(DATE(A1,
1,1)))))=A1,53,52)

This formula works for leap years as well.

--
Kind regards,

Niek Otten

"lsmft" wrote in

message
...
|
| I've noticed that there are 53 Sundays in this year 2006.
| My question:
| Is there a way for Excel to determine how many Sundays or any other day
| of the week that there is in a year?
| Also:
| Can Excel tell how often there will be 53 Sundays in a year?
|
|
| --
| lsmft
| ------------------------------------------------------------------------
| lsmft's Profile:

http://www.excelforum.com/member.php...o&userid=30678
| View this thread:

http://www.excelforum.com/showthread...hreadid=536328
|




  #9   Report Post  
Posted to microsoft.public.excel.misc
JimMay
 
Posts: n/a
Default # of Sundays in a year

Thanks Bob;
How would you change the given formula to get say the Wednesdays?
TIA,

"Bob Phillips" wrote in message
:

I can't get that to work yet Niek, but here is another one

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(DATE(YEAR(A1),1,1)&":"&DATE( YEAR(A1)+1,1
,0))))=1))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Niek Otten" wrote in message
...
I used a formula from Chip Person's site,

http://www.cpearson.com/excel/DateTimeWS.htm#NthDoWYear

With the year in A1:


=IF(YEAR(DATE(A1,1,1+((53-(1=WEEKDAY(DATE(A1,1,1))))*7)+(1-WEEKDAY(DATE(A1,
1,1)))))=A1,53,52)

This formula works for leap years as well.

--
Kind regards,

Niek Otten

"lsmft" wrote in

message
...
|
| I've noticed that there are 53 Sundays in this year 2006.
| My question:
| Is there a way for Excel to determine how many Sundays or any other day
| of the week that there is in a year?
| Also:
| Can Excel tell how often there will be 53 Sundays in a year?
|
|
| --
| lsmft
| ------------------------------------------------------------------------
| lsmft's Profile:

http://www.excelforum.com/member.php...o&userid=30678
| View this thread:

http://www.excelforum.com/showthread...hreadid=536328
|



  #10   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default # of Sundays in a year

Jim,

The =1 at the end is the Sunday check, so Wednesday would be =4.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"JimMay" wrote in message
news:rTI3g.11261$fG3.7044@dukeread09...
Thanks Bob;
How would you change the given formula to get say the Wednesdays?
TIA,

"Bob Phillips" wrote in message
:

I can't get that to work yet Niek, but here is another one


=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(DATE(YEAR(A1),1,1)&":"&DATE( YEAR(A1)+1,1
,0))))=1))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Niek Otten" wrote in message
...
I used a formula from Chip Person's site,

http://www.cpearson.com/excel/DateTimeWS.htm#NthDoWYear

With the year in A1:



=IF(YEAR(DATE(A1,1,1+((53-(1=WEEKDAY(DATE(A1,1,1))))*7)+(1-WEEKDAY(DATE(A1,
1,1)))))=A1,53,52)

This formula works for leap years as well.

--
Kind regards,

Niek Otten

"lsmft" wrote in

message
...
|
| I've noticed that there are 53 Sundays in this year 2006.
| My question:
| Is there a way for Excel to determine how many Sundays or any other

day
| of the week that there is in a year?
| Also:
| Can Excel tell how often there will be 53 Sundays in a year?
|
|
| --
| lsmft

| ------------------------------------------------------------------------
| lsmft's Profile:

http://www.excelforum.com/member.php...o&userid=30678
| View this thread:

http://www.excelforum.com/showthread...hreadid=536328
|







  #11   Report Post  
Posted to microsoft.public.excel.misc
JimMay
 
Posts: n/a
Default # of Sundays in a year

D3 is my input cell for year to be tested..

In F3 I entered:
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(DATE(YEAR($D3),1,1)&":"&DATE (YEAR($D3)+1,1,0))))=1))

And copied across to L3, changing each cell's (only) last numeric to:
G3 2
H3 3
I3 4
J3 5
K3 6
L3 7

As I change D2 - from 2000, to 2001, to 2002 etc
All cells F3:L3 remain UNCHANGED - Doesn't seem right
Sunday registers as 53 for all years... hummmmmm



"Bob Phillips" wrote in message
:

Jim,

The =1 at the end is the Sunday check, so Wednesday would be =4.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"JimMay" wrote in message
news:rTI3g.11261$fG3.7044@dukeread09...
Thanks Bob;
How would you change the given formula to get say the Wednesdays?
TIA,

"Bob Phillips" wrote in message
:

I can't get that to work yet Niek, but here is another one


=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(DATE(YEAR(A1),1,1)&":"&DATE( YEAR(A1)+1,1
,0))))=1))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Niek Otten" wrote in message
...
I used a formula from Chip Person's site,
http://www.cpearson.com/excel/DateTimeWS.htm#NthDoWYear

With the year in A1:



=IF(YEAR(DATE(A1,1,1+((53-(1=WEEKDAY(DATE(A1,1,1))))*7)+(1-WEEKDAY(DATE(A1,
1,1)))))=A1,53,52)

This formula works for leap years as well.

--
Kind regards,

Niek Otten

"lsmft" wrote in
message
...
|
| I've noticed that there are 53 Sundays in this year 2006.
| My question:
| Is there a way for Excel to determine how many Sundays or any other

day
| of the week that there is in a year?
| Also:
| Can Excel tell how often there will be 53 Sundays in a year?
|
|
| --
| lsmft

| ------------------------------------------------------------------------
| lsmft's Profile:
http://www.excelforum.com/member.php...o&userid=30678
| View this thread:
http://www.excelforum.com/showthread...hreadid=536328
|




  #12   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier
 
Posts: n/a
Default # of Sundays in a year

Hi Bob

I'm probably doing something very silly, but I get an answer of 53 for
both Sunday and Monday with this formula, and 52 for all other days.

--
Regards

Roger Govier


"Bob Phillips" wrote in message
...
Jim,

The =1 at the end is the Sunday check, so Wednesday would be =4.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"JimMay" wrote in message
news:rTI3g.11261$fG3.7044@dukeread09...
Thanks Bob;
How would you change the given formula to get say the Wednesdays?
TIA,

"Bob Phillips" wrote in message
:

I can't get that to work yet Niek, but here is another one


=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(DATE(YEAR(A1),1,1)&":"&DATE( YEAR(A1)+1,1
,0))))=1))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Niek Otten" wrote in message
...
I used a formula from Chip Person's site,
http://www.cpearson.com/excel/DateTimeWS.htm#NthDoWYear

With the year in A1:



=IF(YEAR(DATE(A1,1,1+((53-(1=WEEKDAY(DATE(A1,1,1))))*7)+(1-WEEKDAY(DATE(A1,
1,1)))))=A1,53,52)

This formula works for leap years as well.

--
Kind regards,

Niek Otten

"lsmft"
wrote in
message
...
|
| I've noticed that there are 53 Sundays in this year 2006.
| My question:
| Is there a way for Excel to determine how many Sundays or any
other

day
| of the week that there is in a year?
| Also:
| Can Excel tell how often there will be 53 Sundays in a year?
|
|
| --
| lsmft

| ------------------------------------------------------------------------
| lsmft's Profile:
http://www.excelforum.com/member.php...o&userid=30678
| View this thread:
http://www.excelforum.com/showthread...hreadid=536328
|







  #13   Report Post  
Posted to microsoft.public.excel.misc
JimMay
 
Posts: n/a
Default # of Sundays in a year

How do you get the # of Wednesdays?


"Bob Phillips" wrote in message
:

I can't get that to work yet Niek, but here is another one

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(DATE(YEAR(A1),1,1)&":"&DATE( YEAR(A1)+1,1
,0))))=1))

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Niek Otten" wrote in message
...
I used a formula from Chip Person's site,

http://www.cpearson.com/excel/DateTimeWS.htm#NthDoWYear

With the year in A1:


=IF(YEAR(DATE(A1,1,1+((53-(1=WEEKDAY(DATE(A1,1,1))))*7)+(1-WEEKDAY(DATE(A1,
1,1)))))=A1,53,52)

This formula works for leap years as well.

--
Kind regards,

Niek Otten

"lsmft" wrote in

message
...
|
| I've noticed that there are 53 Sundays in this year 2006.
| My question:
| Is there a way for Excel to determine how many Sundays or any other day
| of the week that there is in a year?
| Also:
| Can Excel tell how often there will be 53 Sundays in a year?
|
|
| --
| lsmft
| ------------------------------------------------------------------------
| lsmft's Profile:

http://www.excelforum.com/member.php...o&userid=30678
| View this thread:

http://www.excelforum.com/showthread...hreadid=536328
|



  #14   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten
 
Posts: n/a
Default # of Sundays in a year

I should have stated more clearly, Year in A1 (like 2000 or 2006), not a date.

One of your famous Sumproduct and -- solutions! Do you have them for breakfast as well? <g

--
Kind regards,

Niek Otten

"Bob Phillips" wrote in message ...
|I can't get that to work yet Niek, but here is another one
|
| =SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(DATE(YEAR(A1),1,1)&":"&DATE( YEAR(A1)+1,1
| ,0))))=1))
|
| --
| HTH
|
| Bob Phillips
|
| (remove nothere from email address if mailing direct)
|
| "Niek Otten" wrote in message
| ...
| I used a formula from Chip Person's site,
| http://www.cpearson.com/excel/DateTimeWS.htm#NthDoWYear
|
| With the year in A1:
|
|
| =IF(YEAR(DATE(A1,1,1+((53-(1=WEEKDAY(DATE(A1,1,1))))*7)+(1-WEEKDAY(DATE(A1,
| 1,1)))))=A1,53,52)
|
| This formula works for leap years as well.
|
| --
| Kind regards,
|
| Niek Otten
|
| "lsmft" wrote in
| message
| ...
| |
| | I've noticed that there are 53 Sundays in this year 2006.
| | My question:
| | Is there a way for Excel to determine how many Sundays or any other day
| | of the week that there is in a year?
| | Also:
| | Can Excel tell how often there will be 53 Sundays in a year?
| |
| |
| | --
| | lsmft
| | ------------------------------------------------------------------------
| | lsmft's Profile:
| http://www.excelforum.com/member.php...o&userid=30678
| | View this thread:
| http://www.excelforum.com/showthread...hreadid=536328
| |
|
|
|
|


  #15   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default # of Sundays in a year


"Niek Otten" wrote in message
...
I should have stated more clearly, Year in A1 (like 2000 or 2006), not a

date.

Doh! To much of reading what I expected.

One of your famous Sumproduct and -- solutions! Do you have them for

breakfast as well? <g

Well I do kinda find them useful, as long as you don't need hundreds of them
in a spreadsheet :-)




  #16   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default # of Sundays in a year

Hello,

There are many solutions to this.

Instead of sumproducts or array formulas I would use:
http://www.sulprobil.com/html/date_formulas.html

(Thanks to Daniel M. again!)

Regards,
Bernd

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get Excel to automatically calculate salaries actually received in financial year? Kei Excel Discussion (Misc queries) 0 March 3rd 06 10:26 AM
Differentiating data by year into columns Toon Excel Worksheet Functions 1 February 22nd 06 06:12 PM
Fiscal Year Calculation DaGo21 Excel Worksheet Functions 13 February 7th 06 10:16 AM
years change to current year nwg Excel Worksheet Functions 5 January 1st 06 03:29 PM
Ho to Delete "Ghost" Pivot Tables needyourhelp Excel Discussion (Misc queries) 3 November 17th 05 10:10 PM


All times are GMT +1. The time now is 02:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"