Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default I want to calculate Sundays between a specific date & today ()

Respected Sir
I want to calculate Sundays between a earlier specific date & today ()
Plz gide me about the Function releted wit above work.

thank you
Zahid Khan
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default I want to calculate Sundays between a specific date & today ()

Try this:-
=SUM(IF(WEEKDAY(A1-1+ROW(INDIRECT("1:"&TRUNC(B1-A1)+1)))=1,1,0))


Start date in A1, End date in A2.

This is an array formula so enter it with CTRL+Shift+Enter.

Will that do?

Mike


"Zahid Khan" wrote:

Respected Sir
I want to calculate Sundays between a earlier specific date & today ()
Plz gide me about the Function releted wit above work.

thank you
Zahid Khan

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default I want to calculate Sundays between a specific date & today ()

Good (array entered):
=SUM(IF(WEEKDAY(A1-1+ROW(INDIRECT("1:"&TRUNC(TODAY()-A1)+1)))=1,1,0))


Better (normally entered):
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&TODAY())),2)=n))

Best (normally entered):
=INT((WEEKDAY(A1-n,2)+TODAY()-A1)/7)

Where n = day of week: Monday = 1 ...... Sunday = 7

Biff

"Mike" wrote in message
...
Try this:-
=SUM(IF(WEEKDAY(A1-1+ROW(INDIRECT("1:"&TRUNC(B1-A1)+1)))=1,1,0))


Start date in A1, End date in A2.

This is an array formula so enter it with CTRL+Shift+Enter.

Will that do?

Mike


"Zahid Khan" wrote:

Respected Sir
I want to calculate Sundays between a earlier specific date & today ()
Plz gide me about the Function releted wit above work.

thank you
Zahid Khan



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
CALCULATE NUMBER OF DAYS BETWEEN A DATE AND TODAY South texas man Excel Worksheet Functions 4 May 19th 06 08:37 PM
Calculate the number of Saturdays or Sundays between 2 dates? Jim Long Excel Discussion (Misc queries) 1 November 1st 05 08:13 PM
calculate how many sundays between two dates in excel jeff thinkin Excel Discussion (Misc queries) 1 September 14th 05 04:12 PM
calculate how many sundays between two dates in excel jeff thinkin Excel Discussion (Misc queries) 2 September 14th 05 03:33 PM
how to calculate a date .. say 34 days from today shaunl Excel Discussion (Misc queries) 5 July 13th 05 02:38 PM


All times are GMT +1. The time now is 07:15 PM.

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

About Us

"It's about Microsoft Excel"