How to calculate the date difference excluding weekend and public holidays for specific date format

nononame2021 256 Reputation points
2024-10-24T09:10:44.09+00:00

I have the following date format , but I can't use these date format to calculate the date difference excluding weekends and holiday. The two date is input as 01-Oct-2024 and 15-Oct-2024. The result should be 9. However, when I use excel function network's, it returns #VALUE. HOW TO FIX IT?

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,954 questions
Excel Management
Excel Management
Excel: A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.Management: The act or process of organizing, handling, directing or controlling something.
1,725 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Barry Schwarz 3,071 Reputation points
    2024-10-24T19:08:23.2066667+00:00

    I entered the two dates exactly as you specified. Both were converted automatically to date values. The NETWORKDAYS function produced the value 11. Adding 14-Oct as a holiday reduced that value to 10. Why do you think it should be 9? Remember, the dates are inclusive. The ten working days are 1, 2, 3, 4, 7, 8, 9, 10, 11, and 15.


  2. Jiajing Hua-MFST 10,565 Reputation points Microsoft Vendor
    2024-10-25T07:06:58.79+00:00

    Hi @nononame2021

    Excel can't treat 01-Oct-2024 as date, how to fix and calculate date difference?

    How did you get this date data? Was it a formula result, entered manually, copied and pasted from other files, or something else?

    If you click the cell include "01-Oct-2024", what will you find in formula bar?

    User's image

    Please make sure Excel read it as a date format, not a text format. You may right click the cell > Format Cells > Date, choose the correct date format.

    User's image

    Besides, as Barry Schwarz replied, the NETWORKDAYS function produced the value 11.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.