View Single Post
  #3   Report Post  
Harlan Grove
 
Posts: n/a
Default

Gord Dibben wrote...
Check out the Help on NETWORKDAYS Function.

It is one of the Functions in the Analysis Toolpak add-in.

....

NETWORKDAYS could be used to check if a particular date, D, were a
workday or not, but it's not immediately obvious how to do so even
after reading online help for this function. The idiom is

=NETWORKDAYS(D,D,Holidays)=1

which returns TRUE if D is a workday or FALSE if not.

FWIW, NETWORKDAYS isn't necessary. The following formula returns TRUE
if D is a workday, FALSE if not.

=AND(WEEKDAY(D,2)<6,COUNTIF(Holidays,D)=0)

This formula is much more flexible. It can handle workdays other than
MTWTF.