# Networkdays excel formula

**URL:** <https://community.glideapps.com/t/networkdays-excel-formula/74953>\
**Category:** Ask for Help\
**Created:** [July 17, 2024, 2:20am UTC](https://community.glideapps.com/t/networkdays-excel-formula/74953 "2024-07-17T02:20:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lee](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lee/32/68882_2.png) [@Lee](https://community.glideapps.com/u/Lee)\
**Post date:** [July 17, 2024, 2:20am UTC](https://community.glideapps.com/t/networkdays-excel-formula/74953/1 "2024-07-17T02:20:56Z")

</div>

Hi,

I am trying to calculate date difference from StartDate to EndDate, and I found interesting excel command from @gvalero : [Date difference excluding weekends and bankholidays](https://community.glideapps.com/t/date-difference-excluding-weekends-and-bankholidays/55385)

When I test it, I can use:  
NETWORKDAYS(A1, A2, {“10/2/2024”, “11/1/2024”, “11/12/2024”, “11/25/2024”, “12/24/2024”, “12/25/2024”, “12/26/2024”})

But I cannot change it to NETWORKDAYS(A1, A2, {A3})  
I put A3 = “10/2/2024”, “11/1/2024”, “11/12/2024”, “11/25/2024”, “12/24/2024”, “12/25/2024”, “12/26/2024”

or NETWORKDAYS(A1, A2, A3)  
I put A3 = {“10/2/2024”, “11/1/2024”, “11/12/2024”, “11/25/2024”, “12/24/2024”, “12/25/2024”, “12/26/2024”}

I also need to be able to set the A3 to “SpecialHolidays”

is there I can do to fix this issue?

---

<div class="post-metadata">

**Author:** ![Lee](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lee/32/68882_2.png) [@Lee](https://community.glideapps.com/u/Lee)\
**Post date:** [July 17, 2024, 2:22am UTC](https://community.glideapps.com/t/networkdays-excel-formula/74953/2 "2024-07-17T02:22:02Z")

</div>

![Screenshot 2024-07-17 at 09.20.21](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/1/f/1f092047a069a2c57cacf8ecc6e8ac6071cf3c30.png)  
Here is the Excel formula that I use

 ![Screenshot 2024-07-17 at 09.20.40](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/7/f77676a630a47fa2d9efc16deba0dfead5edc8e3.png)  
Here is the array of holidays that I want to use

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 17, 2024, 1:31pm UTC](https://community.glideapps.com/t/networkdays-excel-formula/74953/3 "2024-07-17T13:31:20Z")

</div>

I just re-embedded the video that @Darren_Murphy had in that thread.

> [@Date difference excluding weekends and bankholidays](https://community.glideapps.com/t/date-difference-excluding-weekends-and-bankholidays/55385/3):
>
> @Lise_Delarue - here…

---

<div class="post-metadata">

**Author:** ![Lee](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lee/32/68882_2.png) [@Lee](https://community.glideapps.com/u/Lee)\
**Post date:** [July 18, 2024, 6:46am UTC](https://community.glideapps.com/t/networkdays-excel-formula/74953/4 "2024-07-18T06:46:05Z")

</div>

Thank you @ThinhDinh for the info

the solution needs to create a whole start & end date range record/table … which in the end can calculate the leave period… but in my case, I need to do that for all leave submissions that the employer submitted, so I don’t think it’s possible/scalable for my case

I think NetworksDay is the solution, it’s just that I don’t want to “hardcode” the special holidays array data

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 19, 2024, 1:00am UTC](https://community.glideapps.com/t/networkdays-excel-formula/74953/5 "2024-07-19T01:00:50Z")

</div>

> [@EDATE in Excel formula is not working](https://community.glideapps.com/t/edate-in-excel-formula-is-not-working/42998/7):
>
> So I managed to run formulas in excel by creating a column template and replacing the values in it, mostly the issue was because the I can’t add Double Quotations in the Excel formula like the image below But the workaround is to prepare the excel formula in a template column to ensure that all the text is exactly brought from the backend properly to send it to the formula column as below Then map it to the excel formula column will work eventually

Can you try this workaround? It’s not the same function, but your root problem might be due to the double quotes.

---

<div class="post-metadata">

**Author:** ![Lee](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lee/32/68882_2.png) [@Lee](https://community.glideapps.com/u/Lee)\
**Post date:** [July 19, 2024, 7:51am UTC](https://community.glideapps.com/t/networkdays-excel-formula/74953/6 "2024-07-19T07:51:11Z")

</div>

I didn’t understand what Yasin meant LOL

But I manage to solve this issue by using template as the excel formula

 ![Screenshot 2024-07-19 at 14.49.07](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/9/a9a2e1deda00bdfe69908806e566dec88e337845.png)  
 ![Screenshot 2024-07-19 at 14.49.22](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/1/e1261d9cc0c00f2ac16e1345c61c05bc130e3876.png)  
 ![Screenshot 2024-07-19 at 14.49.39](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/5/a50f37a8f94d8dc9bfd3e3771d50ee664e45aed4.png)

---

<div class="post-metadata">

**Author:** ![Lee](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/lee/32/68882_2.png) [@Lee](https://community.glideapps.com/u/Lee)\
**Post date:** [July 19, 2024, 7:55am UTC](https://community.glideapps.com/t/networkdays-excel-formula/74953/7 "2024-07-19T07:55:58Z")

</div>

one more thing … if someone still has some issues, you may want to check your start & end date format, since if you use the default Glide date format it will use mm/dd/yyyy, hh:mm AM/PM, while networkdays I think only need mm/dd/yyyy (without the time), so I use split & single first

![Screenshot 2024-07-19 at 14.53.26](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/f/2feb1e15525fb00f70b65f8464084e35a12adc6e.png)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 19, 2024, 8:16am UTC](https://community.glideapps.com/t/networkdays-excel-formula/74953/8 "2024-07-19T08:16:32Z")

</div>

> [@Lee](#):
>
> But I manage to solve this issue by using template as the excel formula

Yeah I think that was exactly what Yasin did.

> [@Lee](#):
>
> one more thing … if someone still has some issues, you may want to check your start & end date format, since if you use the default Glide date format it will use mm/dd/yyyy, hh:mm AM/PM, while networkdays I think only need mm/dd/yyyy (without the time), so I use split & single first

For a more consistent formatting, you can try using columns to extract the date, month and year, then join them together using a template column, or the “Format Date” column (but it has shown problems on iOS before).

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 19, 2024, 8:16am UTC](https://community.glideapps.com/t/networkdays-excel-formula/74953/9 "2024-07-19T08:16:59Z")

</div>

Be careful with that. Date formatting is device specific. What you see in the Glide Builder is just the way that your specific device represents the date and time. Other devices will format the date in different ways. For example, some may use MM/DD/YYYY, and others may use DD/MM/YYYY. Some may use a comma to separate the date and time, and others may not. You may find that your split may not work correctly on some devices.

When dealing with dates in this way, it is always best to first convert them to integers using a Math column. This ensures the correct results on all devices.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [July 26, 2024, 8:17am UTC](https://community.glideapps.com/t/networkdays-excel-formula/74953/10 "2024-07-26T08:17:49Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
