Time formula

jackdiamond

Board Regular
Joined
Oct 10, 2007
Messages
220
Hi,

I want to write a formula that will work out the difference between 2 times and dates.

eg:

Cell a1 = 01/04/2011 01:30
Cell a2 = 02/04/2011 13:30
Cell a3 = 36

Does anyone know how I can do this please?

Ta
STu
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Hi,

I want to write a formula that will work out the difference between 2 times and dates.

eg:

Cell a1 = 01/04/2011 01:30
Cell a2 = 02/04/2011 13:30
Cell a3 = 36

Does anyone know how I can do this please?

Ta
STu
Well, I couldn't figure out how you got 36 then I realized the dates may be in d/m/y format! ;)

Try this...

=(A2-A1)*24

Format as General or Number
 
Upvote 0
I dont understand what the 36 is(please clarify if i'm missing something), but you can use this formula:

=INT(A2-A1)&" Days "&TEXT(A2-A1-INT(A2-A1),"h:mm")

Edit: thanks Valko. I wish people would put locations in their profiles. Go with his formula then.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top