time calculation excel

P

pan

How can I calculate the difference of time using a formula is excel

I used =text([ending]-[starting],"h:mm:ss) It works untill 23:59 after that
it gives me
#value
 
G

Govind

Hi,

Use

=IF(endtime <starttime, endtime+1-starttime, endtime - starttime)

Regards

Govind.
 
A

Arvi Laanemets

Hi

With start and end times (in time format) in cells A2 and B2
=B2-A2+(B2<A2)
and format as time ("h:mm:ss")


Arvi Laanemets
 
G

Gate Keeper

How can I calculate the difference of time using a formula is excel

I used =text([ending]-[starting],"h:mm:ss) It works untill 23:59 after
that it gives me
#value

Assuming your time values are entered as text in cells A1 and B1, the
formula is the following.

=TEXT(B1-A1,"hh:mm:ss")


SEE: Microsoft Help and Support, "Calculate the difference between two
times"
 
S

Stefan Lewold

Could You do this in VBA as well?
Gate Keeper said:
How can I calculate the difference of time using a formula is excel

I used =text([ending]-[starting],"h:mm:ss) It works untill 23:59 after
that it gives me
#value

Assuming your time values are entered as text in cells A1 and B1, the
formula is the following.

=TEXT(B1-A1,"hh:mm:ss")


SEE: Microsoft Help and Support, "Calculate the difference between two
times"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top