Business hours calculation

  • Thread starter Thread starter mpfirman
  • Start date Start date
M

mpfirman

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
 
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).
 
I have the analysis toolpack for Excel installed, can't find how t
install the analysis toolpack-VBA
 
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.
 
Back
Top