Results 1 to 27 of 27

Add rows based on criteria

Threaded View

  1. #1
    Registered User
    Join Date
    02-12-2012
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2007, 2013
    Posts
    89

    Add rows based on criteria

    I have some data as follows, first column being time and 2nd-5th column representing OHLC-data for stock prices.
    700 1 1 1 1
    705 1 2 2 1
    715 1 1 1 1
    720 1 1 1 1
    725 1 1 1 1

    Between 705 and 715 you can see there is a 10-minute interval instead of a 5 minute. My data is filled with such gaps, sometimes as much as 30 minutes. I need the data to have 5-minute intervals universally everywhere in the dataset, so I need some kind of macro that can insert this data wherever it's missing. So after running the macro, the above dataset would look as such:
    700 1 1 1 1
    705 1 2 2 1
    710 1 2 2 1
    715 1 1 1 1
    720 1 1 1 1
    725 1 1 1 1

    (For the newly inserted row(s), the macro can just copy the OHLC-data in column 2-5 from the previous row and insert it in the new row(s))
    Last edited by Test123Test; 09-24-2013 at 05:05 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy and Paste Rows based on Criteria onto another sheet and sort based on oldest item
    By Kushal8684 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2013, 05:37 AM
  2. Sorting and Delete rows meeting criteria based on sorting criteria
    By ron2k_1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2011, 02:40 PM
  3. Replies: 3
    Last Post: 11-13-2009, 12:05 PM
  4. deleting rows based on criteria
    By scubadude47 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-14-2008, 01:53 PM
  5. Coloring rows based on criteria
    By Marcus Gee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2008, 10:51 PM

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