View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default NETWORKDAYS Function in Macro

Set a reference to the Analysis toolpak, APTVBAEN.XLA (lower-case on my
machine) and then just call it, like so

?networkdays(date-100,date-10)
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Ken" wrote in message
...
If we have dates in A1 and A2, we can use the NETWORKDAYS
function in Excel to get a net workday count.
=NETWORKDAYS(A1,A2)

Is there a way to get this result in a macro?

TIA.