calculate the number of minutes

robertvdb

Active Member
Joined
Jan 10, 2021
Messages
327
Office Version
  1. 2016
Platform
  1. Windows
I have a cell which displays 220:15
For internal reasons, this cell has to be formatted "Custom [h]:mm".

Now I need to calculate the number of minutes = 220*60 + 15 = 13215.

Whatever formula I'm trying does not produce the correct result... Can anyone help ?
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi, While waiting for other experts for more efficient and effective formula, I will share my thought here

FYR:

Book7
ABCD
1220:152201513215
2123:1531231537533
3150:60150609060
4532:535325331973
5532:5331973
Sheet1
Cell Formulas
RangeFormula
C1:C4C1=MID(TEXT(A1,"[h]:mm"),FIND(":",TEXT(A1,"[h]:mm"))+1,LEN(A1)-FIND(":",TEXT(A1,"[h]:mm")))
D1:D4D1=B1*60+C1
B1:B4B1=MID(TEXT(A1,"[h]:mm"),1,FIND(":",TEXT(A1,"[h]:mm"))-1)
B5B5=MID(TEXT(A5,"[h]:mm"),1,FIND(":",TEXT(A5,"[h]:mm"))-1)*60+MID(TEXT(A4,"[h]:mm"),FIND(":",TEXT(A4,"[h]:mm"))+1,LEN(A4)-FIND(":",TEXT(A4,"[h]:mm")))
 
Upvote 0
23 04 30.xlsm
AB
1220:1513,215
Minutes
Cell Formulas
RangeFormula
B1B1=A1*1440


A1 is custom formatted as [h]:mm as you described.
B1 is formatted as Number with no decimal places.
 
Upvote 1
Solution
Thanks Peter, this does the trick !
Thanks also RudRud, but Peter's solution is obviously shorter :)
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,147
Members
449,098
Latest member
Doanvanhieu

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