Getting Minutes from time when rolling over to next day

cknnugget

New Member
Joined
Jun 29, 2020
Messages
44
Office Version
  1. 365
Platform
  1. Windows
Trying to find minutes from times with no dates and the formula is working until the cell format is changed. Any ideas how to correct?
First Time = A1 (23:00)
Second Time =A2 (01:00)
=(A2-A1)+24 returns the correct result (2:00) when the cell is formatted as h:mm
However, I need it as minutes. When the cell is reformatted as [m] Total minutes, it returns 33240 instead of the expected 120 minutes. Any Ideas why?
The overall formula I am using is
=If(A1>A2,(A2-A1)+24,A2-A1)
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Try:
Format cell to [m]
Book2
ABC
123:00Minutes
21:00 AM120
Sheet1
Cell Formulas
RangeFormula
C2C2=MOD(A2-A1,1)
 
Upvote 0
This should give you minutes
=((1-A1)+A2)*(24*60)
1 = a whole day
(remaining hours in first day + hours in next day) * number of minutes in a day
 
Upvote 0
Solution

Forum statistics

Threads
1,215,073
Messages
6,122,970
Members
449,095
Latest member
Mr Hughes

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