+ Reply to Thread
Results 1 to 3 of 3

transforming raw data to new time format

  1. #1
    Registered User
    Join Date
    11-04-2009
    Location
    tuvieja
    MS-Off Ver
    Excel 2003
    Posts
    6

    transforming raw data to new time format

    This is the info i get from a report:

    0d 5h 26m
    0d 4h 57m
    0d 4h 27m
    0d 3h 57m

    I need to generate a new collumn that shows 30 mins intervals (from 00:00 to 23:30) using cells that contain the infor as shown above. That is, Column C shows "Time" as shown above, and some how i want to have a column D showing to which interval does the column c cells belonfs to. Say, C1 shows 0d 5h 26m, then D1 should read 05:00 (because it belongs to 05:00-05:30 interval)

    My initial attempts where to use Left/Right formula and using a different sheet where all intervals are located as reference. So i have one sheet named Data, where i paste the data i get from a report, and another one calls Reference where all intervals are shown.

    I hope i was clear enough as to what im after, and i really appreciate any help you guys can provide.

    best regards!

  2. #2
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: transforming raw data to new time format

    There might be shorter ways to do this, but =TIME(MID(C1,FIND(" ",C1)+1,FIND("h",C1)-FIND(" ",C1)-1),INT(SUBSTITUTE(RIGHT(C1,3),"m","")/30)*30,0) works for me.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: transforming raw data to new time format

    Try:

    =FLOOR(TIME(MID(A1,FIND(" ",A1)+1,FIND("h",A1)-FIND(" ",A1)-1)+0,MID(A1,FIND("h",A1)+2,FIND("m",A1)-FIND("h",A1)-2)+0,0)*24,0.5)/24

    where A1 contains original info from report
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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