Dateif with Workday

scott11

New Member
Joined
Sep 13, 2016
Messages
37
Hello,

I have the following formula in E2 to calculate the number of days between two dates: =DATEDIF(C2,D2,"D"). However, I want to include the WORKDAY function along with a set of holidays to not calculate. The holidays are in F2:F4. I believe this is what I need in order for cell E2 to calculate only business days, excluding the holidays I have listed.

Thank you.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Thanks, but we have other holiday's that aren't covered by the NETWORKDAYS function
You supply your own list of Holidays with NETWORKDAYS (Excel does not give you any holidays).

Here is another write-up that shows you more explicitly how to set-up and use a holiday list.

It also doesn't return a numerical value when dates are used in the formula.
I have no idea what you mean by this. Can you provide an example?
Note that dates in Excel are actually stored as numbers. So if you are getting a number when you are expecting a date, simple re-format the cell to a date format, and you will see the date in the format you are used to.
 
Upvote 0
You supply your own list of Holidays with NETWORKDAYS (Excel does not give you any holidays).

Here is another write-up that shows you more explicitly how to set-up and use a holiday list.


I have no idea what you mean by this. Can you provide an example?
Note that dates in Excel are actually stored as numbers. So if you are getting a number when you are expecting a date, simple re-format the cell to a date format, and you will see the date in the format you are used to.
The DATEDIF formula is returning a number value instead of a date value to show me the number of days that have past between the two dates. NETWORKDAYS doesn't return that value, only a date. So is there a way to combine those two functions to return the number of days between those dates, minus my holidays list? Currently, I get 10 days between 11/16/2020 and 11/27/2020, indicating the DATEDIF function is not accounting for the Thanksgiving holiday.
 
Upvote 0
NETWORKDAYS doesn't return that value, only a date.
Networkdays returns a number, not a date, you may need to change the cell format.
For those two dates Datedif should return 11
+Fluff v2.xlsm
CDEF
1
216/11/202027/11/20201126/11/2020
3925/12/2020
4
Master
Cell Formulas
RangeFormula
E2E2=DATEDIF(C2,D2,"d")
E3E3=NETWORKDAYS(C2,D2,F2:F3)
 
Upvote 0
Networkdays returns a number, not a date, you may need to change the cell format.
For those two dates Datedif should return 11
+Fluff v2.xlsm
CDEF
1
216/11/202027/11/20201126/11/2020
3925/12/2020
4
Master
Cell Formulas
RangeFormula
E2E2=DATEDIF(C2,D2,"d")
E3E3=NETWORKDAYS(C2,D2,F2:F3)
Ah, I see. Thank you very much!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,213,533
Messages
6,114,179
Members
448,554
Latest member
Gleisner2

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