+ Reply to Thread
Results 1 to 3 of 3

Write new data rows to a new sheet based on data in sheet 1

  1. #1
    Registered User
    Join Date
    05-07-2011
    Location
    Ashdown Forest, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Write new data rows to a new sheet based on data in sheet 1

    Hi, This is my first post to the forum. I have found lots of very useful information here but I still need a bit of help. I have an Excel program that has been developed for me that reads GPS data every second. It has an added function to read wind speed and direction every second. I do not want to change this program as it has been extensively tested. My problem is that due to memory limitations with the wind vane I have I am only able to record wind speed and direction every 30 seconds.

    What I need to do is expand the data such that I have a row every second. I envisage doing this by reading the first row and then copying it 30 times to a new sheet, reading the 2nd row and copying that 30 times to rows 31-60 etc so that I have a CSV file with data every second. The data I need to manipulate is seconds from a datum, speed and direction

    Is this approach appropriate? And what would the macro code be?

    As a nicety I may wish to interpolate the derived data between the 30 second readings (and I know that is fun with heading data close to North!)

    I've tried recording a manual process but I'm left struggling with the necessary looping for the 30 rows and identify the initial cell for each batch of derived data. Any help would be much appreciated.
    Last edited by NickPovey; 05-07-2011 at 05:07 PM. Reason: improve title

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Write new data rows to a new sheet based on data in sheet 1

    I wonder whether this will help you


    suppose sheet 1 is where the data is downloaded every 30 seconds
    sheet2 is where you archive data.
    I also assume one downloaded data is archived the the data can be cleared for downloading new data

    DO NOT EXPERIMENT WITH THIS MACRO IN YOUR ORIGINAL FILE. DO IT IN A COPIED FILE SO THAT ORIGINAL FILE IS SAFE.

    Please Login or Register  to view this content.
    of course it would be difficult to run this macro every time you download the data (that is once in 30 seconds). you can create a event code so that every time A1 cell changes the macro will be automatically run. think on these lines

  3. #3
    Registered User
    Join Date
    05-07-2011
    Location
    Ashdown Forest, England
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Write new data rows to a new sheet based on data in sheet 1

    venkat,

    This is very good of you, I will experiment along these lines.

    The wind vane logs the data internally throughout the day, it is at the end of the day that we download the data as a CSV file. All the results are calculated at the end of the day.

    So rather than clearing the data in sheet 1 as it is read, want I need is just to step to the next row in sheet 1. The macro only needs to run once to read approx 1500 rows and generate the new file which will have 45000 rows (assuming 1500 'real' data rows).

    I'll let you know how I get on, your help is much appreciated.

+ 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