+ Reply to Thread
Results 1 to 4 of 4

VBA Script to Delete empty rows

  1. #1
    Forum Contributor
    Join Date
    02-16-2006
    Posts
    241

    VBA Script to Delete empty rows

    I have an Excel file that contains blank data after row 5000 or so. This causes my Excel file to be larger than it should be. Manually I can go to the 1st empty row and select all the "blank" rows and select delete all rows and this corrects the problem. However, I want to do this with a script. I have tried the following to no avail.


    Please Login or Register  to view this content.
    Any suggestions would be appreciated.

    * Note: This is just an excerpt of the pertinent parts of the code.


    Thanks,

    Met

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: VBA Script to Delete empty rows

    If the cells are really blanks:

    Please Login or Register  to view this content.
    PS:
    There is an excel function called goto; that CRLT+G, then select blanks, you are home and dry.
    Last edited by AB33; 11-23-2016 at 01:06 PM.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: VBA Script to Delete empty rows

    Perhaps like so:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    02-16-2006
    Posts
    241

    Re: VBA Script to Delete empty rows

    Thanks I really appreciate the help.

+ 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. Delete Empty Rows and empty columns from the word table
    By mvneema in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2014, 10:51 AM
  2. [SOLVED] Program a conditional script that will delete entire row if cell in column B is empty
    By Rabbitstew in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2012, 01:54 PM
  3. delete duplicate rows, delete empty rows
    By loade in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-03-2012, 05:42 AM
  4. Delete rows without numbers (modify existing script)
    By The Phil in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-20-2011, 11:13 AM
  5. Script to delete rows when condition fulfilled
    By Rutger in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-02-2010, 08:11 AM
  6. Autofilter/delete empty rows is deleting non-empty rows!
    By oOarthurOo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-05-2010, 12:31 PM
  7. Delete Specified columns and/or rows script
    By Immortal_Creati in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2008, 04:24 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