=NETWORKDAYS(start_date,end_date,[holidays])
NETWORKDAYS(start_date, end_date, 7)
You can use the NETWORKDAYS function to count the number of whole weeks between two dates. To count the number of whole weeks between two dates, you would use the preceding formula, where 7 is the number of days in a week. This formula will return the number of whole weeks between the two dates, excluding any holidays.
NETWORKDAYS(start_date, end_date, "12/25/2020, 1/1/2021")
You can also use the NETWORKDAYS function to exclude holidays from the total number of days between two dates. To exclude holidays, you would need to list the dates of the holidays in the [holidays] argument. For example, if you wanted to exclude the dates of Christmas and New Year's from the total number of days, you would use the preceding formula, where 12/25/2020 and 1/1/2021 are the dates of Christmas and New Year's.
The NETWORKDAYS function is used to calculate the number of working days between two dates, excluding weekends and holidays. It can be used to calculate employee benefits based on the number of days worked.