+ Reply to Thread
Results 1 to 6 of 6

Use time data from an exported report in a formula - not working!

  1. #1
    Registered User
    Join Date
    12-17-2012
    Location
    Carrollton, TX
    MS-Off Ver
    Excel 2010
    Posts
    20

    Use time data from an exported report in a formula - not working!

    I have a machine that outputs data in a pretty raw format. Two of the columns are a start time and end time of a project. The format is "dd-mm-yy hh:mm:ss" for both. I am trying to insert a column that determines the length of time. I would think I could subtract one column from the other, but it's not working. I have tried clearing out all of the dates, leaving just the time. I have tried converting the time from general to number to time, etc. - not working. I have tried eliminating the seconds, I have tried doing many different things, and I always get the same result - "#value!". These are HUGE lists of info, so figuring this info one by one is really not feasible. Does anybody know what's up with this or how to get around it please?

    Thanks
    Michael

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Use time data from an exported report in a formula - not working!

    Post an attached workbook containing a small example of your data.
    Gary's Student

  3. #3
    Registered User
    Join Date
    12-17-2012
    Location
    Carrollton, TX
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Use time data from an exported report in a formula - not working!

    Sorry. Here is a portion of just the data I'm talking about.
    Attached Files Attached Files

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Use time data from an exported report in a formula - not working!

    Your data was actually text. See the attached.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-17-2012
    Location
    Carrollton, TX
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Use time data from an exported report in a formula - not working!

    I have no idea what it is you did there... Would you mind explaining all the "=DATE(MID(A2,7,4),MID(A2,4,2),LEFT(A2,2))+TIME(--MID(A2,12,2),--MID(A2,15,2),--RIGHT(A2,2))" stuff please? I would really appreciate it!

  6. #6
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Use time data from an exported report in a formula - not working!

    Sure................I treated all the material in columns A and B as simple strings of text. Dates and times can be added/subtracted, strings can not.

    Cols C and D convert cols A and B into "real" date/times that can be manipulated by formulas. For example the =DATE() function makes at "real" date like:

    =DATE(2012,12,25)

    similar with the =TIME() function.

    I used the =MID() functions to gather pieces of the strings to feed the DATE/TIME functions.

    Column E performs the simple math with a reasonable formatting.

+ 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