Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Philipp,
You can build your own little VBA function and use it either in your spreadsheet directly or invoked in a macro. For an example in a macro: nWkDays = NWD(DateSerial(2004,4,23), Date) Function NWD(ByVal Start As Date, ByVal Finish As Date) As Long Dim Tot As Long, nSat As Long, nSun As Long Tot = 1 + Finish - Start nSat = Int((Finish - Weekday(Finish - 6) - Start + 8) / 7) nSun = Int((Finish - Weekday(Finish) - Start + 8) / 7) NWD = Tot - nSat - nSun End Function Advise if you need the Holidays parameter. Regards, Daniel M. "Philipp Oberleitner" wrote in message ... Can i embedd this in a macro and is there a possibility to do it without an addin ? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Diff in business days | Excel Discussion (Misc queries) | |||
Calculating 10 Business Days from the Last Business Day of the Mon | Excel Worksheet Functions | |||
UK Business Days Formula | Excel Worksheet Functions | |||
Business Days Only | Excel Discussion (Misc queries) | |||
How many business days were in 2005? | Excel Worksheet Functions |