ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I change weekends from Sat, Sun to Fri, Sat in networkdays (https://www.excelbanter.com/excel-worksheet-functions/239078-how-do-i-change-weekends-sat-sun-fri-sat-networkdays.html)

Suresh

How do I change weekends from Sat, Sun to Fri, Sat in networkdays
 
I want to use the Networkdays function to get the working days between two
dates. But in my case I want to make Firday and Saturday as weekend rather
than Saturday and Sunday. Is it possible.

Thanks!

Jacob Skaria

How do I change weekends from Sat, Sun to Fri, Sat in networkdays
 
Hi Suresh

The syntax for NETWORKDAYS() do not provide a customization on the weekdays
straightaway. The below formula use WEEKDAY() function to get the number of
working days (inclusive of start and end days) excluding Friday and Saturdays

A1 = start date
B1 = end date

=SUMPRODUCT(INT((B1-A1+WEEKDAY(A1-{1,2,3,4,5}))/7))

The days to be counted are mentioned in the array {1,2,3,4,5}. To count Sat
and Sun add the day numbers {6,7}

If this post helps click Yes
---------------
Jacob Skaria


"Suresh" wrote:

I want to use the Networkdays function to get the working days between two
dates. But in my case I want to make Firday and Saturday as weekend rather
than Saturday and Sunday. Is it possible.

Thanks!


Jacob Skaria

How do I change weekends from Sat, Sun to Fri, Sat in networkd
 
Correction to
<<<To count Sat and Sun add the day numbers {6,7}

shoud have been
To count Fri and Sat add the day numbers {6,7}

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Hi Suresh

The syntax for NETWORKDAYS() do not provide a customization on the weekdays
straightaway. The below formula use WEEKDAY() function to get the number of
working days (inclusive of start and end days) excluding Friday and Saturdays

A1 = start date
B1 = end date

=SUMPRODUCT(INT((B1-A1+WEEKDAY(A1-{1,2,3,4,5}))/7))

The days to be counted are mentioned in the array {1,2,3,4,5}. To count Sat
and Sun add the day numbers {6,7}

If this post helps click Yes
---------------
Jacob Skaria


"Suresh" wrote:

I want to use the Networkdays function to get the working days between two
dates. But in my case I want to make Firday and Saturday as weekend rather
than Saturday and Sunday. Is it possible.

Thanks!


Ashish Mathur[_2_]

How do I change weekends from Sat, Sun to Fri, Sat in networkdays
 
Hi,

Try this

=SUMPRODUCT(1*(WEEKDAY(ROW(INDIRECT(C5&":"&C6)))<6 ))

C5 holds the beg date and C6 holds the ending date

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Suresh" wrote in message
...
I want to use the Networkdays function to get the working days between two
dates. But in my case I want to make Firday and Saturday as weekend rather
than Saturday and Sunday. Is it possible.

Thanks!




All times are GMT +1. The time now is 01:14 PM.

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