How to calculate the difference in hours between two date-time values:
One of our website visitors wanted to know how to calculate the time
difference in hours between two date-time values in Microsoft Excel. He
also wanted to know how to do this using a macro. The problem is quite
interesting for scientific experiments as well as for calculating the
number of hours worked on a project.
The macro code assumes that the dates are in cells A2 and B2 and you want the result to be shown in cell C2: