Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Akhilesh Dalia
 
Posts: n/a
Default How to get difference in hours

I have few thousand rows, which contain arrival date, arrival time, received
date & arrival time. I want to get difference in hours, what is the
difference between arrival and received.

Few examples
A B C D
01/Jan/2005 12:14:29 PM 02/Jan/2005 9:30:00 AM

based on above data in E column I want difference between date & time in
total hour.

Thanks for spent your time on this question.

Regards

Akhilesh Dalia
akhileshdalia<athotmail<dotcom
  #2   Report Post  
 
Posts: n/a
Default

Hi
Try this:
=(C2+D2)-(A2+B2)
and format the result as [hh]

--
Andy.


"Akhilesh Dalia" wrote in message
...
I have few thousand rows, which contain arrival date, arrival time,
received
date & arrival time. I want to get difference in hours, what is the
difference between arrival and received.

Few examples
A B C D
01/Jan/2005 12:14:29 PM 02/Jan/2005 9:30:00 AM

based on above data in E column I want difference between date & time in
total hour.

Thanks for spent your time on this question.

Regards

Akhilesh Dalia
akhileshdalia<athotmail<dotcom



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

If they are all in separate cells

=INT((C1-A1-IF(B1D1,1-B1+D1,-(D1-B1)))*24)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Akhilesh Dalia" wrote in message
...
I have few thousand rows, which contain arrival date, arrival time,

received
date & arrival time. I want to get difference in hours, what is the
difference between arrival and received.

Few examples
A B C D
01/Jan/2005 12:14:29 PM 02/Jan/2005 9:30:00 AM

based on above data in E column I want difference between date & time in
total hour.

Thanks for spent your time on this question.

Regards

Akhilesh Dalia
akhileshdalia<athotmail<dotcom



  #4   Report Post  
Jason Morin
 
Posts: n/a
Default

=(C1+D1)-(A1+B1)

and format as [hh]:mm:ss.

Or use:

=((C1+D1)-(A1+B1))*24

and format as General to get a decimal format.

HTH
Jason
Atlanta, GA


"Akhilesh Dalia" wrote:

I have few thousand rows, which contain arrival date, arrival time, received
date & arrival time. I want to get difference in hours, what is the
difference between arrival and received.

Few examples
A B C D
01/Jan/2005 12:14:29 PM 02/Jan/2005 9:30:00 AM

based on above data in E column I want difference between date & time in
total hour.

Thanks for spent your time on this question.

Regards

Akhilesh Dalia
akhileshdalia<athotmail<dotcom

  #5   Report Post  
ΊΌΦέΘΛ
 
Posts: n/a
Default

datedif()




  #6   Report Post  
Akhilesh Dalia
 
Posts: n/a
Default

Dear friends,

Thanks for help, but still I'm not getting correct answer. It may be my
mistake to explain my problem. Let's go through real data as per below.

My A1 column contain 01-Jan-2005, B1 column contain 16:54:28 PM, C1 column
contain 04-Jan-2005 and D1 column contain 09:45:45 AM. Now if you calculate
manually the right answer is 64:51 Hrs. But when I'm applying all your
suggestions and formulas I'm not getting 64:51, but some other figures, which
is not correct. I want machine also to give 64:51 Hrs.

Pleas help again.

Akhilesh Dalia
akhileshdalia<athotmail<dotcom

"Akhilesh Dalia" wrote:

I have few thousand rows, which contain arrival date, arrival time, received
date & arrival time. I want to get difference in hours, what is the
difference between arrival and received.

Few examples
A B C D
01/Jan/2005 12:14:29 PM 02/Jan/2005 9:30:00 AM

based on above data in E column I want difference between date & time in
total hour.

Thanks for spent your time on this question.

Regards

Akhilesh Dalia
akhileshdalia<athotmail<dotcom

  #7   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

You need to use a custom format of [hh]:mm for the result, I get 64:51 using
your example
Btw, no need to use AM/PM since you use 24 hour time (16:54:28) Btw, Andy
told you to use [hh] format

--
Regards,

Peo Sjoblom


"Akhilesh Dalia" wrote in message
...
Dear friends,

Thanks for help, but still I'm not getting correct answer. It may be my
mistake to explain my problem. Let's go through real data as per below.

My A1 column contain 01-Jan-2005, B1 column contain 16:54:28 PM, C1 column
contain 04-Jan-2005 and D1 column contain 09:45:45 AM. Now if you
calculate
manually the right answer is 64:51 Hrs. But when I'm applying all your
suggestions and formulas I'm not getting 64:51, but some other figures,
which
is not correct. I want machine also to give 64:51 Hrs.

Pleas help again.

Akhilesh Dalia
akhileshdalia<athotmail<dotcom

"Akhilesh Dalia" wrote:

I have few thousand rows, which contain arrival date, arrival time,
received
date & arrival time. I want to get difference in hours, what is the
difference between arrival and received.

Few examples
A B C D
01/Jan/2005 12:14:29 PM 02/Jan/2005 9:30:00 AM

based on above data in E column I want difference between date & time in
total hour.

Thanks for spent your time on this question.

Regards

Akhilesh Dalia
akhileshdalia<athotmail<dotcom



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference in Hours Karan Excel Discussion (Misc queries) 4 April 21st 05 11:07 AM
calculate hours just can't figure it out monish74 Excel Worksheet Functions 1 February 13th 05 07:31 PM
calculate difference in time to hours Chris Excel Worksheet Functions 5 January 18th 05 06:07 PM
How do I calculate difference in days & hours between two dates e. probi2 Excel Worksheet Functions 1 January 12th 05 03:59 PM
Subtracting paid hours from unpaid hours ejerry7 Excel Worksheet Functions 5 November 29th 04 04:16 AM


All times are GMT +1. The time now is 08:21 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"