Hi Guys!
As the title says, I'm basically looking to calculate the difference in hours between two date/time fields in this format DD/MM/YY HH:MM. When calculating the difference, I only want to calculate BUSINESS HOURS between the two dates and omit weekends from the calculation.
As an example:
A1=05/09/2014 08:00.......... A2=08/09/2014 18:00
Therefore by running this VBA code or whatnot, the output should spit out the value "20:00:00". This is because it counts the hours on the 05th which is a friday from 08:00 to 18:00 which is 10 hours and skips the weekend but counts the 08th which is a Monday from 08:00AM to 18:00 which is an additional 10 hours.
Therefore 10+10=20
I have tried using a custom add in I found but it doesn't seem to work.
Is there a potential VBA/macro solution?
Any help would be greatly appreciated. Whoever can solve this is an absolute legend.
Thanks in advance!
As the title says, I'm basically looking to calculate the difference in hours between two date/time fields in this format DD/MM/YY HH:MM. When calculating the difference, I only want to calculate BUSINESS HOURS between the two dates and omit weekends from the calculation.
As an example:
A1=05/09/2014 08:00.......... A2=08/09/2014 18:00
Therefore by running this VBA code or whatnot, the output should spit out the value "20:00:00". This is because it counts the hours on the 05th which is a friday from 08:00 to 18:00 which is 10 hours and skips the weekend but counts the 08th which is a Monday from 08:00AM to 18:00 which is an additional 10 hours.
Therefore 10+10=20
I have tried using a custom add in I found but it doesn't seem to work.
Is there a potential VBA/macro solution?
Any help would be greatly appreciated. Whoever can solve this is an absolute legend.
Thanks in advance!