I have duration data in text format like so:
19min 30s
I would like to convert this to hours and I need the hours to be integers. How do i do that? I have tried to split the text but I am unable to categorise the array into hours, minutes and seconds
CodePudding user response:
Try
=("0:"&textjoin(":",,REGEXEXTRACT(A1,REGEXREPLACE(A1,"(\d )","($1)"))))*24
CodePudding user response:
use:
=ARRAYFORMULA(IF(A2:A="",,
IFNA(REGEXEXTRACT(A2:A, "(\d )h")/24)
IFNA(REGEXEXTRACT(A2:A, "(\d )min")/24/60)
IFNA(REGEXEXTRACT(A2:A, "(\d )s")/24/60/60)))