Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Count days between two dates excluding weekends | Excel Programming | |||
Counting # of days between 2 dates excluding Fri & Sat) | Excel Worksheet Functions | |||
Working Days excluding Sundays | Excel Discussion (Misc queries) | |||
Excel - list days of a month, excluding Sundays | Excel Discussion (Misc queries) | |||
Count Days excluding Sundays | Excel Worksheet Functions |