Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Days between 2 dates excluding Sundays only

Hi, I need to get the number of days between 2 dates excluding Sundays
only. I know about networkdays but that exclude all weekend and take
in consideration all week days as 1 day.
Example 1
A2 = Sep 16 (Fri)
B2 = Sep 19 (Mon)
If you do B2-A2 = 3 because Fri = 0 Sat = 1 Sun = 1 and Mon = 1
Using NETWORKDAYS(A2,B2) = 2 because Friday = 1 and Monday = 1
What I need is B2-A2 = 2 Fri = 0 Sat = 0 Sun = 1 and Mon = 1
Result 2

Example 2
A2 = Sep 15 (Thu)
B2 = Sep 16 (Fri)
If you do B2-A2 = 1 because Thu = 0 Fri = 1
Using NETWORKDAYS(A2,B2) = 2 because Thu = 1 and Fri = 1
What I need is B2-A2 = 1 Thu = 0 Fri = 1

Are you able to help me?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,045
Default Days between 2 dates excluding Sundays only

On Thu, 29 Sep 2011 16:15:07 -0700 (PDT), JGGL wrote:

Hi, I need to get the number of days between 2 dates excluding Sundays
only. I know about networkdays but that exclude all weekend and take
in consideration all week days as 1 day.
Example 1
A2 = Sep 16 (Fri)
B2 = Sep 19 (Mon)
If you do B2-A2 = 3 because Fri = 0 Sat = 1 Sun = 1 and Mon = 1
Using NETWORKDAYS(A2,B2) = 2 because Friday = 1 and Monday = 1
What I need is B2-A2 = 2 Fri = 0 Sat = 0 Sun = 1 and Mon = 1
Result 2

Example 2
A2 = Sep 15 (Thu)
B2 = Sep 16 (Fri)
If you do B2-A2 = 1 because Thu = 0 Fri = 1
Using NETWORKDAYS(A2,B2) = 2 because Thu = 1 and Fri = 1
What I need is B2-A2 = 1 Thu = 0 Fri = 1

Are you able to help me?



=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A2&":"&B2)))<1))-1

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
Count days between two dates excluding weekends JGGL Excel Programming 2 February 18th 11 10:15 PM
Counting # of days between 2 dates excluding Fri & Sat) Khaledity Excel Worksheet Functions 33 March 29th 09 01:05 PM
Working Days excluding Sundays danh Excel Discussion (Misc queries) 6 March 31st 07 08:52 PM
Excel - list days of a month, excluding Sundays John Excel Discussion (Misc queries) 1 January 3rd 06 04:43 PM
Count Days excluding Sundays KENNY Excel Worksheet Functions 3 November 11th 04 05:26 PM


All times are GMT +1. The time now is 08:55 AM.

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"