+ Reply to Thread
Results 1 to 5 of 5

Loop Copying Problems

  1. #1
    Registered User
    Join Date
    03-10-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Loop Copying Problems

    Hi, i've wrote a code with loops to try and copy data between 2 times.
    here it is

    Please Login or Register  to view this content.
    Now my first Problem is that for the if statment with the and i cannot get the <= and >= to work properly is i use as is written in the code at the moment then it only give me a couple of value out of 10 even though they are all between the dates, also is i change it so they both are >= then it gives me every value but the first one. Can anyone tell me where i'm going wrong.
    Thanks for all the help

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Loop Copying Problems

    Welcome to the forum, Wes.

    We're looking at code that doesn't work, and trying to imagine the workbook that goes with it. That's a tough combination.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-10-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Loop Copying Problems

    haha ok i get your point, hope thats a bit better.
    sorry
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-10-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Loop Copying Problems

    I've fixed the problem now, i realised that the 2 times i was using were in different formats, one did not have the seconds added to them, so after adding this it gave me the correct values. Also to solve the problem of it not including the 1st value i did all of the data, then at the end i put the title to the columns at the end.
    Please Login or Register  to view this content.
    And also i will include the final piece of the weather system that records data and now will show data between 2 dates on a graph, all from the forms menu.
    Attached Files Attached Files

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Loop Copying Problems

    I remember this workbook.

    Format all the cells that are supposed to be dates as General. If they don't turn into numbers, they're stored as text, which means code isn't going to work. You need to fix that first.

+ 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