The NETWORKDAYS function returns the net working days between two given dates after excluding weekends (Saturday and Sunday) automatically and can optionally excludes a list of holidays given as dates.
NETWORKDAYS(start_date, end_date, [holidays])
start_date – Required. The start date of the period from which to calculate net working days.
end_date – Required. The end date of the period from which to calculate net working days.
[holidays] – [Optional]. The optional argument use to specify holidays other than weekends.
The #VALUE! error appears if any argument supplied is not in a valid date format.