Reputation: 2402
I have formula to convert text "2 hours 43 mins" to "2,43". Sometimes value is "1 hour 43 mins" and my current solution does not work in this case. How to make it work in both cases "2 hours 43 mins" and "1 hour 43 mins"? I have tried to use OR with no success.
This is my current formula:
=SUBSTITUTE(SUBSTITUTE(Q68;"mins";"");" hours ";",")
I have tried:
=SUBSTITUTE(SUBSTITUTE(Q68;"mins";"");OR(" hours ";" hour ");",")
Upvotes: 0
Views: 48
Reputation: 96753
How about:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(Q68;"min";"");" hour";",");"s";"")
EDIT#1:
The "best approach":
Upvotes: 2
Reputation: 5696
Try this:
=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(Q68;"s";"");"min";"");" hour ";",")
Upvotes: 3