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

S

Suresh

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!
 
J

Jacob Skaria

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
 
J

Jacob Skaria

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
 
A

Ashish Mathur

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top