+ Reply to Thread
Results 1 to 1 of 1

How to insert multiple rows at once at different locations

  1. #1
    Valued Forum Contributor luv2glyd's Avatar
    Join Date
    07-13-2008
    Location
    Seattle, WA, US
    MS-Off Ver
    Excel 2010
    Posts
    679

    Smile How to insert multiple rows at once at different locations

    I wrote some code for a task I have, but wanted to see if anyone has any ideas on how to speed it up.

    Column A has a timestamp in each row in milliseconds from midnight (1/1000 of a second). What I'd like to do is insert a blank row where there's a gap in column A of more than 1-second (1000 milliseconds), so that in the end, there's a total of 24000 rows - both original, with data, as well as complete blanks, without data. Sometimes there is a gap of many more than one second, so more than one blank row will need to be inserted - exactly equal to the number of the missing seconds. I am no programmer by any means, so the code I wrote basically goes row by row and inserts a row where ever is necessary, one location at a time. Is there a way to tweak the code so that it essentially remembers how many rows to insert at needed locations, and then inserts them all at once? Or something similar to speed the process up? I think that may be faster than doing it one location at a time as it does now. Thank you.

    Here's what I've used:
    Please Login or Register  to view this content.
    Data Cleaner Sample 1.xlsm
    Last edited by luv2glyd; 02-28-2013 at 03:36 PM.
    You either quit or become really good at it. There are no other choices.

+ 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