+ Reply to Thread
Results 1 to 4 of 4

Output two different sets of data in consecutive order based on timesteps

  1. #1
    Registered User
    Join Date
    09-13-2014
    Location
    Bergen, Norway
    MS-Off Ver
    2007
    Posts
    6

    Output two different sets of data in consecutive order based on timesteps

    Hi,

    I'm trying to output two different data sets in consecutive order based on two different durations.

    Lets say I will populate the data in Column A and Column B. The duration of the first data set is 10 seconds, which gives me 11 time steps. They will hence be plotted in rows 1-11. The next data set has a duration of 20 seconds (21 time steps), and will be plotted in rows 12-32.

    Now comes the tricky part! The next 11 time steps shall be the first data set, and after that comes the second data set (and so on, and so on).

    I want a code that does this automatically. And note that the duration of the data sets will vary, so I need a code that will work with duration as a variable. How can I make this work?

    I tried to write a code that changed from one data set to the other based on summing up the the previous steps (duration steps data set 1/2) and seeing if the sum = sum(data set 1/2). I think this should work, but I didn't have the skills to write the code.

    Any help would be much appreciated!

    \Carl

  2. #2
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: Output two different sets of data in consecutive order based on timesteps

    Hi Carl,

    I think you need to post a workbook showing what you need. I can't visualize it!

    Regards,

    David

    Please remember, your request is clearer if you attach a sample workbook.
    - Reply, then Click on Go Advanced and click on the Paper Clip.




  3. #3
    Registered User
    Join Date
    09-13-2014
    Location
    Bergen, Norway
    MS-Off Ver
    2007
    Posts
    6

    Re: Output two different sets of data in consecutive order based on timesteps

    Thanks for the reply. I tried to visualize it in the attachment.

    \Carl
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-13-2014
    Location
    Bergen, Norway
    MS-Off Ver
    2007
    Posts
    6

    Re: Output two different sets of data in consecutive order based on timesteps

    I solved it myself using 2 FOR loops within 1 FOR loop.

    \Carl

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Pasting multiple data sets *bypassing clipboard* without a header and in order
    By niccio2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2015, 05:22 PM
  2. Function to Input sets of data, then write the output
    By Nater5000 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-13-2013, 04:25 PM
  3. (Urgent) Macro output different for different data sets - Please help
    By supershanks in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2013, 07:36 AM
  4. Showing Correlation between 2 sets of data that have to be in time order.
    By joshnathan in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 02-25-2013, 07:50 AM
  5. Replies: 7
    Last Post: 01-16-2013, 05:35 PM
  6. Matching Two sets of Data and Get a New Output Sheet
    By crapmind in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2007, 03:48 PM
  7. Replies: 0
    Last Post: 08-14-2006, 05:00 AM

Tags for this Thread

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