+ Reply to Thread
Results 1 to 5 of 5

Formula > Convert date to time format

  1. #1
    Registered User
    Join Date
    05-26-2014
    Posts
    2

    Formula > Convert date to time format

    Hi all,

    I am fairly savvy in using excel for my needs, but this problem has literally stumped me and is why I am here asking for your expert advice

    In Column A1>A3 cell the following will appear from some raw data :

    2d, 3h, 45m
    or
    3h, 45m
    or
    45m

    I need to turn this into the following format :

    48:03:45
    &
    00:03:45
    &
    00:00:45

    I have literally no idea where to begin with this so please if anyone can help, it would be greatly appreciated.

    Any questions please just shout.

    Thanks.
    Last edited by Ransom12; 05-26-2014 at 03:56 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Formula Help

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Formula > Convert date to time format

    Try this user defined function

    Please Login or Register  to view this content.

    Open the VBA editor by hitting Alt F11.
    Insert a new module with Insert - Module
    Paste in the above function
    Go back to the sheet by hitting Alt F11.

    In B2, enter =TimeSpecial(A1)

    Remember to save the workbook as a macro enabled workbook .xlsm
    Martin

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Formula > Convert date to time format

    Check does this help.
    Format cell as [h]:mm:ss

    Works for XL2007 and newer

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-26-2014
    Posts
    2

    Re: Formula > Convert date to time format

    Quote Originally Posted by mrice View Post
    Try this user defined function

    Please Login or Register  to view this content.

    Open the VBA editor by hitting Alt F11.
    Insert a new module with Insert - Module
    Paste in the above function
    Go back to the sheet by hitting Alt F11.

    In B2, enter =TimeSpecial(A1)

    Remember to save the workbook as a macro enabled workbook .xlsm

    Yes this works perfectly. I am not sure the policy on Macros with work, but it absolutely worked a treat.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1