• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Remove text "minutes" "hours" from field leaving only numeric value

ccubbage

New Member
The data I receive from another system looks like this:

TimeWorked
15 minutes
1 hour (60 minutes)
1 minute
5 hours (300 minutes)


I would like to strip out the text and hours value so that I can sum the minutes. Column B should look like this:

Minutes
15
60
1
300

Can anyone help me create a formula for this?
 

Attachments

  • TimeWorked.xlsx
    8 KB · Views: 8
Hi:

The formula John gave will give you 60 even if you make your time from 1 hour (60 minutes) to 1 hour (6 minutes).

I guess this formula will cover that glitch

=IFERROR(IF(ISTEXT(LOOKUP(2^15,SEARCH("hour",J15),J15)),MID(J15,FIND("~",SUBSTITUTE(J15," ","~",2))+2,FIND("~",SUBSTITUTE(J15," ","~",3))-FIND("~",SUBSTITUTE(J15," ","~",2))-2),LEFT(J15,FIND("~",SUBSTITUTE(J15," ","~")))),0)

Thanks
 
Back
Top