How to convert rows of times in Xh Ym format into usable numbers?

charlesstricklin

Board Regular
Joined
May 6, 2013
Messages
98
Office Version
  1. 2021
Platform
  1. Windows
Lyft formats my times booked & online in the format below. Is there any way (no VBA scripts, please) to massage this data so that columns E & F can show a usable sum at the bottom? Maybe in the same format, total minutes only, or even add columns to separate hours and minutes for each. I realize this is probably a big ask but you folks must love challenges.

FYI As best I can calculate Booked Time totals 106h 700m or 117h 40m, and the Online Time should come out to 1,098m or 187h 18m. (I think)

(No offense intended to the VBA enthusiasts, but I'd just rather keep things plain.)


2024 Earnings.xlsx
EF
1Booked TimeOnline Time
24h 53m7h 51m
31h 15m2hr 6m
411h 56m19h 8m
556m1h 45m
62h 29m3h 46m
74h 52m6h 24m
82h 30m4h 14m
952m1h 52m
1019h 33m24h 17m
1115h 59m21h 6m
1216h 8m18h 46m
133h 3m3h 9m
1444m3h 30m
151h 54m2h 55m
166h 27m11h 41m
172h 40m6h 9m
185h 43m10h 4m
1915h 46m28h 35m
Lyft Earnings
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Maybe this.
Book1
EFGH
1Booked TimeOnline TimeBooked Time HoursOnline Time Hours
24h 53m7h 51m4.887.85
31h 15m2hr 6m1.252.10
411h 56m19h 8m11.9319.13
556m1h 45m0.931.75
62h 29m3h 46m2.483.77
74h 52m6h 24m4.876.40
82h 30m4h 14m2.504.23
952m1h 52m0.871.87
1019h 33m24h 17m19.5524.28
1115h 59m21h 6m15.9821.10
1216h 8m18h 46m16.1318.77
133h 3m3h 9m3.053.15
1444m3h 30m0.733.50
151h 54m2h 55m1.902.92
166h 27m11h 41m6.4511.68
172h 40m6h 9m2.676.15
185h 43m10h 4m5.7210.07
1915h 46m28h 35m15.7728.58
20
21Total Hours117.67177.30
Sheet1
Cell Formulas
RangeFormula
G2:H19G2=LET(h,IFERROR(--LEFT(E2,SEARCH("h",E2)-1),0),s,SUBSTITUTE(E2,"m",""),m,--IFERROR(MID(s,SEARCH(" ",s),3),s),h+m/60)
G21:H21G21=SUM(G2:G19)
 
Upvote 0
Solution
Maybe this.
Book1
EFGH
1Booked TimeOnline TimeBooked Time HoursOnline Time Hours
24h 53m7h 51m4.887.85
31h 15m2hr 6m1.252.10
411h 56m19h 8m11.9319.13
556m1h 45m0.931.75
62h 29m3h 46m2.483.77
74h 52m6h 24m4.876.40
82h 30m4h 14m2.504.23
952m1h 52m0.871.87
1019h 33m24h 17m19.5524.28
1115h 59m21h 6m15.9821.10
1216h 8m18h 46m16.1318.77
133h 3m3h 9m3.053.15
1444m3h 30m0.733.50
151h 54m2h 55m1.902.92
166h 27m11h 41m6.4511.68
172h 40m6h 9m2.676.15
185h 43m10h 4m5.7210.07
1915h 46m28h 35m15.7728.58
20
21Total Hours117.67177.30
Sheet1
Cell Formulas
RangeFormula
G2:H19G2=LET(h,IFERROR(--LEFT(E2,SEARCH("h",E2)-1),0),s,SUBSTITUTE(E2,"m",""),m,--IFERROR(MID(s,SEARCH(" ",s),3),s),h+m/60)
G21:H21G21=SUM(G2:G19)

Perfect! I did make minor addition for formatting's sake:

Excel Formula:
=IF(ISBLANK(E2),"",LET(h,IFERROR(--LEFT(E2,SEARCH("h",E2)-1),0),s,SUBSTITUTE(E2,"m",""),m,--IFERROR(MID(s,SEARCH(" ",s),3),s),h+m/60))
 
Upvote 0

Forum statistics

Threads
1,224,812
Messages
6,181,091
Members
453,021
Latest member
Justyna P

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