Calculate number of days between two dates without weekends and public holidays

Hello everyone,

I am new to Coda.io and I would like to calculate the number of days between two dates by counting weekends and public holidays.
For example, I would like to calculate the number of days from 05/31/2024 to 01/04/2024. This will give us 3 days excluding Saturday and Sunday (5-2 = 3).

Thank you in advance for your help.

Coda has created a wonderful formula for this purpose NetWorkingDaysCoda formulas, formula library, formula cheat sheet - Coda

(This formula counts non-working days, depending on the document settings, and you can also specify a table with holidays, which it will also subtract from working days).