View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Function for calculating workdays?

Sorry I made a mistake
You must set the reference like Bob say

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ron de Bruin" wrote in message ...
Yes

Sub test()
Dim workdaycount As Integer
workdaycount = NETWORKDAYS(Date, Date + 14)
MsgBox workdaycount
End Sub

Check the VBA Addin also On the Tools menu




--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Thorleif Cederqvist" wrote in message ...
Hi Ron

Is this function available in VBA code window?

Regards
TC, Sweden
"Ron de Bruin" skrev i meddelandet
...
Check out this function

NETWORKDAYS(start_date,end_date,holidays)

If this function is not available, and returns the #NAME? error, install

and load the Analysis ToolPak add-in.

How?

On the Tools menu, click Add-Ins.
In the Add-Ins available list, select the Analysis ToolPak box, and then

click OK.
If necessary, follow the instructions in the setup program.
Syntax





--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Thorleif Cederqvist" wrote in

message ...
Hi

Is there a function to calculate workdays? What I have is two serial
numbers. The period between them also includes weekends, that should be
eliminated.

Thanks in advance
TC, Sweden