ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Business hours calculation (https://www.excelbanter.com/excel-programming/285557-business-hours-calculation.html)

mpfirman

Business hours calculation
 
I would like to be able to calculate the difference between tw
dates/times but only count the business hours. For instance for an
hour day 1/2/04 08:00 - 1/1/04 08:00 would equal 8 hours. I previousl
was doing this with a formula using the NETWORKDAYS function but woul
like to re-write the entire spreadsheet using VBA. Any help o
suggestions would be appreciated. Thank you

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Business hours calculation
 
if you load and set a reference to the Analysis toolpak - VBA, you can call
networkdays directly in VBA like it was a function you wrote (not an excel
builtin function).

--
Regards,
Tom Ogilvy

"mpfirman" wrote in message
...
I would like to be able to calculate the difference between two
dates/times but only count the business hours. For instance for an 8
hour day 1/2/04 08:00 - 1/1/04 08:00 would equal 8 hours. I previously
was doing this with a formula using the NETWORKDAYS function but would
like to re-write the entire spreadsheet using VBA. Any help or
suggestions would be appreciated. Thank you.


---
Message posted from http://www.ExcelForum.com/




mpfirman[_2_]

Business hours calculation
 
I have the analysis toolpack for Excel installed, can't find how t
install the analysis toolpack-VBA

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Business hours calculation
 
Tools=Addins,
right under Analysis toolpak should be Analysis toolpak - VBA. Just click
the checkbox and it should load.

If it isn't a choice, possibly you need to use add/remove programs in the
control panel to bring up the office setup and install it.

ATPVBAEN.XLA

Will be the file you see in the project explorer in the VBE if it is loaded.
(funcres.xla is the analysis toolpak itself). Before trying to install it,
you might do a search of your drive and see if you have it. If so, use the
browse button in Tools=Addins.
--
Regards,
Tom Ogilvy


"mpfirman" wrote in message
...
I have the analysis toolpack for Excel installed, can't find how to
install the analysis toolpack-VBA?


---
Message posted from http://www.ExcelForum.com/




mpfirman[_3_]

Business hours calculation
 
Got it, thank you very much !

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 06:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com