+ Reply to Thread
Results 1 to 7 of 7

Imported Data vs. Excel Data - Comparison Problems

Hybrid View

  1. #1
    Registered User
    Join Date
    11-17-2006
    Posts
    4

    Imported Data vs. Excel Data - Comparison Problems

    Hi All.

    I am having a problem with data that I import from a .txt file into excel. I have a .txt file that contains readings from an air conditioning unit that are recorded every 15 min only when the machine is on. I bring this data into excel and would like to search through it to find the appropriate date and time on my excel sheet. Then paste this found data to the relevant date and time. Sounds simple right? Well it would not work because when excel converts the data from the .txt file to serial time, the rounding is different (see example below) and cannot find a match. I have considered using the mm/dd/yyy 00:00 AM/PM format as text, but ran into more problems trying to advance the search 15 min every time. (in serial time I just add (15/1440), which is (min/min in a day))

    Example:

    Date/Time: 11/6/2006 6:15 AM
    Excel Calculated Serial Num: 39027.2604166666
    Imported Serial Num: 39027.2604166667

    I dont know if I am missing somthing or just doing it wrong!
    Any Help on this matter would be greatly appreciated!

    Thanx

    Dan

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    i've pasted in from your post and put "11/6/2006 6:15 AM" in another cell and both cells format to "39027.2604166667"
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Could truncate function fix your problem ...?

    =TRUNC(A1,6)
    HTH
    Carim

  4. #4
    Registered User
    Join Date
    11-17-2006
    Posts
    4
    yes when you paste in 11/6/2006 6:15 AM it makes 39027.2604166667, but my formula in the cell that i am looking for takes the the serial num 39027 and adds (15/1440) to each consecutive cell to advance the date by 15 min. when this number is put into serial form it turns into 39027.2604166666. I am going to try truncating it.

    thanx

  5. #5
    Registered User
    Join Date
    11-17-2006
    Posts
    4
    is there any way to automatically truncate an entire column? or do you have to type it ineach cell?

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    If your data is in column A, then your formula goes in B1 and then double-click on the lower right corner of B1 on the (+)and it will "flood" column B as far as the data goes in column A

  7. #7
    Registered User
    Join Date
    11-17-2006
    Posts
    4
    ok thanx,
    but is there any way to write that in VB code, like Range(A:A).truncate?? or something?

+ 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