Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
jon s
 
Posts: n/a
Default Determining the number of specific days between two dates in Excel

I need a formula or process that allows you to determine the number of
specific days (Mondays, Tuesdays, etc) between two dates.
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Here is a formula from Daniel M

=SUM(--(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2))

A2, B2 are the 2 dates, C2 is the day of the week (1=Sun, 2=Mon, etc.)

It is an array formula, so commit with Ctrl-Shift-Enter.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"jon s" <jon wrote in message
...
I need a formula or process that allows you to determine the number of
specific days (Mondays, Tuesdays, etc) between two dates.



  #3   Report Post  
tpmax
 
Posts: n/a
Default

Use DAYS360 or NETWORKDAYS (use this one if you only want to calculate
business days).

"jon s" wrote:

I need a formula or process that allows you to determine the number of
specific days (Mondays, Tuesdays, etc) between two dates.

  #4   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Fri, 18 Mar 2005 23:27:18 -0000, "Bob Phillips"
wrote:

=SUM(--(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2))


Neat formula. But if A2 and B2 are "dates", why the TRUNC function? Or did it
come from a construct where times were included?


--ron
  #5   Report Post  
Daniel.M
 
Posts: n/a
Default

Hi Bob,

Brute force!? : That must be from my earlier days ;-))

The number of DOW (1= Sunday, 2 = Monday, ..., 7 = Saturday) between a start
date (A1) and an end date (A2) is :

=INT((A2-WEEKDAY(A2+1-DOW)-A1+8)/7)

Regards,

Daniel M.

"Bob Phillips" wrote in message
...
Here is a formula from Daniel M

=SUM(--(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2))

A2, B2 are the 2 dates, C2 is the day of the week (1=Sun, 2=Mon, etc.)

It is an array formula, so commit with Ctrl-Shift-Enter.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"jon s" <jon wrote in message
...
I need a formula or process that allows you to determine the number of
specific days (Mondays, Tuesdays, etc) between two dates.







  #6   Report Post  
J Simpson
 
Posts: n/a
Default

Bob,

Many thanks. Works great!

js

"Bob Phillips" wrote:

Here is a formula from Daniel M

=SUM(--(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2))

A2, B2 are the 2 dates, C2 is the day of the week (1=Sun, 2=Mon, etc.)

It is an array formula, so commit with Ctrl-Shift-Enter.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"jon s" <jon wrote in message
...
I need a formula or process that allows you to determine the number of
specific days (Mondays, Tuesdays, etc) between two dates.




  #7   Report Post  
Bob Phillips
 
Posts: n/a
Default

Hi Daniel,

It is the one I have in my library, but checking Google, I see that you have
'moved on' :-)

Bob


"Daniel.M" wrote in message
...
Hi Bob,

Brute force!? : That must be from my earlier days ;-))

The number of DOW (1= Sunday, 2 = Monday, ..., 7 = Saturday) between a

start
date (A1) and an end date (A2) is :

=INT((A2-WEEKDAY(A2+1-DOW)-A1+8)/7)

Regards,

Daniel M.

"Bob Phillips" wrote in message
...
Here is a formula from Daniel M

=SUM(--(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2))

A2, B2 are the 2 dates, C2 is the day of the week (1=Sun, 2=Mon, etc.)

It is an array formula, so commit with Ctrl-Shift-Enter.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"jon s" <jon wrote in message
...
I need a formula or process that allows you to determine the number of
specific days (Mondays, Tuesdays, etc) between two dates.







  #8   Report Post  
Jon S
 
Posts: n/a
Default

do have a twist on the earlier questions and wondered if anyone knows how to
do it. Im trying to do the following:

Within a date range (say 1/5/05 to 3/25/05) I would like to identify each
month and further find the number of Mondays, Tuesdays, and etc, within each
month.

Any thoughts? Thanks for the help,


"Bob Phillips" wrote:

Here is a formula from Daniel M

=SUM(--(WEEKDAY(A2-1+ROW(INDIRECT("1:"&TRUNC(B2-A2)+1)))=C2))

A2, B2 are the 2 dates, C2 is the day of the week (1=Sun, 2=Mon, etc.)

It is an array formula, so commit with Ctrl-Shift-Enter.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"jon s" <jon wrote in message
...
I need a formula or process that allows you to determine the number of
specific days (Mondays, Tuesdays, etc) between two dates.




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
Where is DateDiff function in Excel 2002 ? Nigel Welch Excel Worksheet Functions 4 March 4th 05 03:18 PM
Number of records by Month that meet a specific requirement Keith Brown Excel Worksheet Functions 1 February 5th 05 05:42 PM
Count number of days in given month? Bryan Excel Worksheet Functions 10 February 2nd 05 11:44 PM
Determining number of days between dates Debbie Excel Worksheet Functions 4 January 20th 05 12:07 AM
Calculating interest on number of days in the period Ron Excel Worksheet Functions 0 January 18th 05 12:59 AM


All times are GMT +1. The time now is 07:03 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"