Converting hours to minutes

TC123

New Member
Joined
Dec 14, 2010
Messages
32
Hello,

In column A1 I have 09:00 and in column B1 I have 12:30. I need a formula that will work out the time and then convert that into minutes. I have worked out that =B1-A1 works out the time which is 3.30 hours but I want this displayed as minutes. For example, this works out to be 210 minutes. Can anyone help? Thanks
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
If you just want it displayed as minutes use a custom number format of [mm]
 
Upvote 0
minutes = int(time2 - time 1) * 24 * 60
hours = int(minutes/60)
mins in hour = minutes mod 60
(you may need to try minutes + 1 mod 61 - 1 or similar, but I think it will work)
 
Upvote 0
Hello,

In column A1 I have 09:00 and in column B1 I have 12:30. I need a formula that will work out the time and then convert that into minutes. I have worked out that =B1-A1 works out the time which is 3.30 hours but I want this displayed as minutes. For example, this works out to be 210 minutes. Can anyone help? Thanks
Try this...

=(B1-A1)*1440

1440 = number of minutes in a day (24hrs * 60min/hr = 1440)
 
Upvote 0
Thank you so much, that's brilliant! Sorry to be a pain but I was also wondering if you could help me with one other small problem. I have 7 columns - A B C D E F G. In column G, I would like it to work out (in minutes) again what E2-A2 is (which is fine as I know how to do this now). However, I only want column G to work this out if columns B2 and D2 are empty. If they are not empty and have a figure I want column G to show 00:00. Does this make sense?

Thank you again
 
Upvote 0
=if(and(B2=0, D2=0),E2-A2,0)
might need
=if(and(B2="", D2=""),E2-A2,0)
or even
=if(and(value(B2)=0, value(D2)=0),E2-A2,0)
 
Upvote 0
Thank you so much, that's brilliant! Sorry to be a pain but I was also wondering if you could help me with one other small problem. I have 7 columns - A B C D E F G. In column G, I would like it to work out (in minutes) again what E2-A2 is (which is fine as I know how to do this now). However, I only want column G to work this out if columns B2 and D2 are empty. If they are not empty and have a figure I want column G to show 00:00. Does this make sense?

Thank you again
Try this...

=IF(COUNT(B2,D2)=2,0,IF(COUNT(A2,E2)=2,(E2-A2)*1440,0))
 
Upvote 0

Forum statistics

Threads
1,224,582
Messages
6,179,670
Members
452,936
Latest member
anamikabhargaw

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