Jump to content

Recommended Posts

Posted

Hi,

In my excel spreadsheet, I have a column named start and one named end. I enter data in the fields as follows:

 

Start Finish

01/02/2012 12:23 02/02/2012 :14:34

 

I want to know if it is possible to subtract the finish from start to show how many hours its taken to completed.

 

Any IDeas?

Posted (edited)

DateDiff Function

 

DATEDIF Worksheet Function

 

Although this can only give difference in days, see here --> Calculate Hours Between Two Dates and Times in Excel | Excel Semi-Pro

 

Calculating Hours Between 2 Dates and Times

 

If we recall that the unit of time is “the Day,” this value represents 1-1/3 days of time. Since there are 24 hours in a day, converting to hours is a simple multiplication 24 * 1.3333 = or 32 hours. (24 * 4/3 to be more precise)

Finding the number of hours between two date/times is simple, just subtract the start date/time from the end date/time and multiply the result by 24 hours.

If you want to enter the dates and times separately (which is loads easier than typing in a date/time in one cell) then add the date/times together.

Hours = ((End_Date+End_Time)-(Start_Date+Start_Time))*24

Here’s a look at a typical worksheet designed to calculate the hours between two dates.

 

Other option might be a VBA Sub or Function if you need it calculated more precisely ?

Edited by mac_shinobi

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...