# Microsoft Office Application Help - Excel Help forum > Excel Formulas & Functions >  >  Calculating time difference

## TomBP

Hi everyone,

Instead of calculating a time difference manually I want to have a formula do it for me. What I want to achieve goes as followed:

08/06/2006 04:33

12/06/2006 01:05

Time difference is 92:32 [hh:mm]


Another example:

09/06/2006 12:42

12/06/2006 11:35

Time difference is 70:53 [hh:mm]


So instead of getting 92:32 and 70:53 by calculating it myself I would like to have a formula do it for me. Otherwise I'll have to invest a lot of time to get the information I need.

Thx in advance

Regards



Tom

----------


## oldchippy

> Hi everyone,
> 
> Instead of calculating a time difference manually I want to have a formula do it for me. What I want to achieve goes as followed:
> 
> 08/06/2006 04:33
> 
> 12/06/2006 01:05
> 
> Time difference is 92:32 [hh:mm]
> ...



Hi Tom BP,

If start date/time in A1 and end date/time in A2, then in A3

=A2-A1, then custom format to [hh]:00

oldchippy  :Smilie:

----------


## TomBP

Thx oldchippy. Works like a charm now. I changed [hh]:00 to [h]:mm tho.

----------


## oldchippy

> Thx oldchippy. Works like a charm now. I changed [hh]:00 to [h]:mm tho.



Glad to be of help, thanks for the feedback

----------


## TomBP

No problem oldchippy

It isn't over yet tho. I was stupid enough to make a different column for date and time. It looks like this:

A1 ------- -- A2
07/06/2006 10.00

Now instead of changing the format of A1 and adding 10.00 manually is there a way I can merge those two cells so it shows 07/06/2006 10.00?

Seeing as I have 851 rows it would save me some time

----------


## oldchippy

> No problem oldchippy
> 
> It isn't over yet tho. I was stupid enough to make a different column for date and time. It looks like this:
> 
> A1 ------- -- A2
> 07/06/2006 10.00
> 
> Now instead of changing the format of A1 and adding 10.00 manually is there a way I can merge those two cells so it shows 07/06/2006 10.00?
> 
> Seeing as I have 851 rows it would save me some time



No problem again, just do this in A3 and copy down 851 rows

=A1+A2

oldchippy  :Smilie:

----------


## kidman86

Could someone tell me how to do exactly the same thing using a macro in excel? I have no idea about vba and macros and I really need to do it... Please help!

----------


## oldchippy

Hi,

Please start a new thread

_Your post does not comply with Rule 2 of our Forum_ RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

----------

