I’m looking for a formula that acts like networkdays in that I can set my holiday exclusion list, but I want to count weekends. Any help?

ihipera_rs

New Member
Joined
Mar 3, 2020
Messages
3
Office Version
  1. 365
Platform
  1. Windows
  2. Web
I am wanting to know the difference between two dates, including weekends but excluding a Covid lockdown period (about 80 consecutive days)
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I'm new here, but I've been using Excel and VBA for many decades. so here is my thought:

there is no way that any coding language is going to have the span length of the COVID pandemic in it's arsenal. however, VBA has many date functions. the primary one to get the difference between two dates is DATEDIFF(arg, arg, arg, arg). I think there are 4 arguments in there. by default, I believe, that function includes weekend days.
 
Upvote 0
maybe (as mentioned above but as worksheet function):
Book1
BCD
201/01/2020133
301/08/2020
Sheet1
Cell Formulas
RangeFormula
D2D2=DATEDIF(B2,B3,"d")-80

or
Book1
AB
201/01/2020
301/08/2020
4
5covid01/02/2020
620/04/2020
7
8result134
Sheet1
Cell Formulas
RangeFormula
B8B8=DATEDIF(B2,B3,"d")-DATEDIF(B5,B6,"d")
 
Last edited:
Upvote 0
I am wanting to know the difference between two dates, including weekends but excluding a Covid lockdown period (about 80 consecutive days)

Hi, here is another option:

=NETWORKDAYS.INTL(A2,B2,"0000000",holidays)

Where holidays is a list of dates to exclude,
 
Upvote 0

Forum statistics

Threads
1,214,853
Messages
6,121,935
Members
449,056
Latest member
denissimo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top