+ Reply to Thread
Results 1 to 3 of 3

Delete blank rows between data rows, shift rows up, then repeat

  1. #1
    Forum Contributor
    Join Date
    02-18-2013
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2016
    Posts
    221

    Delete blank rows between data rows, shift rows up, then repeat

    Hello!

    I have data in the rows 2, 16, 32, 46, 59, 71. The other rows are blank

    Now I want to do the following: delete 3 blank rows and shift all rows up, then delete another 3 rows between 16 and 32 and shift the rows up and the same process again between 32 and 46, 46 and 59 and so on. I have more data (it doesnt end in row 71), so the process should continue to do this.

    So the basic idea would be: delete 3 blank rows between the first two data rows, shift the rows under the deleted rows up, then move on to the second and third data row and delete another 3 rows, and so on.

    Do you have any ideas on how to do this?

    Thank you very much,

    excelactuary

  2. #2
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,164

    Re: Delete blank rows between data rows, shift rows up, then repeat

    Your question will be well explained with an excel sheet. It will be good if you highlight which rows you want to keep.

    Is it just a fixed number of 3 rows that you need deleted or is there a condition to be checked before deletion?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    02-18-2013
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2016
    Posts
    221

    Re: Delete blank rows between data rows, shift rows up, then repeat

    This code did the trick:

    Please Login or Register  to view this content.

+ 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