ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   calculate number of days btw dates (https://www.excelbanter.com/excel-worksheet-functions/74165-calculate-number-days-btw-dates.html)

Nelson

calculate number of days btw dates
 
Hello,
I'm trying to calculate the total number of days availabe between two dates.
I know that I can use Networkdays, but that will get me Monday to Friday.
Now, I need to know how can I calculate the number of days available btw the
dates BUT Monday to Thursday (or Tuesday to Friday)?

Thank you in advance,

Nelson

Peo Sjoblom

calculate number of days btw dates
 
You can still use networkdays, just include the Fridays or Mondays in the
holidays part and they won't be included,
that is certainly both shorter and easier than adding a formula that
subtract all Fridays/Mondays for networkdays

--

Regards,

Peo Sjoblom

Northwest Excel Solutions

www.nwexcelsolutions.com

(remove ^^ from email address)

Portland, Oregon




"Nelson" wrote in message
...
Hello,
I'm trying to calculate the total number of days availabe between two
dates.
I know that I can use Networkdays, but that will get me Monday to Friday.
Now, I need to know how can I calculate the number of days available btw
the
dates BUT Monday to Thursday (or Tuesday to Friday)?

Thank you in advance,

Nelson



daddylonglegs

calculate number of days btw dates
 

This will exclude Mondays as well as weekends where your start date is
in A1 and end date in B1

=NETWORKDAYS(A1,B1)-INT((WEEKDAY(A1-2)+B1-A1)/7)

be aware that if you use the 3rd argument of NETWORKDAYS with this to
exclude holidays you should not include any Mondays within your holiday
range because they will then be excluded twice and your result will be
incorrect

You can exclude Fridays by using the ame formula but with the 2 changed
to a 6


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=516919



All times are GMT +1. The time now is 02:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com