Afternoon all,
Im looking for help with the below image. I'm trying to convert this data from its current format, to total hours rounded up to the nearest full hour.
Capture.PNG
Example document also included.
Afternoon all,
Im looking for help with the below image. I'm trying to convert this data from its current format, to total hours rounded up to the nearest full hour.
Capture.PNG
Example document also included.
Please try at F5
=ROUNDUP(SUMPRODUCT(TEXT(MID("00"&SUBSTITUTE(B5,",",", "),FIND({"d","h","m"},"00"&SUBSTITUTE(B5,",",", ")&"dhm")-4,3),"0;;;\0")/{1,24,1440})*24,0)
In E5, enter
=IFERROR(TRIM(LEFT([@[Time in location]],FIND("day",[@[Time in location]])-1))*24,0)+IFERROR(VALUE(TRIM(MID([@[Time in location]],FIND("hour",[@[Time in location]])-3,3))),IFERROR(VALUE(TRIM(LEFT([@[Time in location]],FIND("hour",[@[Time in location]])-1))),0))+IF(ISERROR(FIND(" 0 minute",[@[Time in location]])),1,0)
I wasn't sure if you would ever have minutes not included, or tagged as 0 minute(s) - I thought it would be 0 minutes, but if there are no minutes included when there are full hours, just change
+IF(ISERROR(FIND(" 0 minute",[@[Time in location]])),1,0)
to
+IF(ISERROR(FIND("minute",[@[Time in location]])),0,1)
Bernie Deitrick
Excel MVP 2000-2010
That is a very clever solution!
I agree with Bernie.
I will have to study that one for a while. It goes in my "to keep file".
Dave
Bernie and Dave, Thank you.
Here another version of the formula
=SUM(TEXT(MID(0&A5,SEARCH({"d","h","m","se"},0&A5&"dhmise")-3,2),"0;;;\0")*{1,"1:0","0:1","0:0:1"})
19.jpg
https://www.facebook.com/XcWizard/po...60604607341301
Last edited by Bo_Ry; 04-02-2021 at 03:18 PM.
Amazing thanks all
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks