+ Reply to Thread
Results 1 to 9 of 9

deleting blank rows issue

  1. #1
    Registered User
    Join Date
    10-12-2009
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    95

    deleting blank rows issue

    Is there a more efficient way to delete blank rows than this following code? The reason I ask is, this requires you to have data in column A but I have lots of scenarios where column A may not have anything, but the rest, or other collums in its corresponding row, do. I only really want something to delete completely blank rows.
    Any ideas?
    Range("A:A").SpecialCells(xlCellTypeBlanks).EntireRow.Delete
    Check out my photography site, Lens Art http://www.lensart.me.uk

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: deleting blank rows issue

    You may try something like this....

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: deleting blank rows issue

    @ sktneer,


    Good solution!

    For the benefit of those who have deliberate Empty Rows above their Data Set, it might be a good idea to provide for such instances,i.e.;

    Please Login or Register  to view this content.

    Regards.
    Last edited by Winon; 02-04-2016 at 10:56 AM. Reason: Highlight comment
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: deleting blank rows issue

    Thanks for the feedback Winon!

  5. #5
    Registered User
    Join Date
    10-12-2009
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    95

    Re: deleting blank rows issue

    that appears to be pretty much perfect mate. Thank you very much

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: deleting blank rows issue

    Hi gdallas,

    Thank you for the feedback.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Thanks.

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: deleting blank rows issue

    you're welcome gdallas! Glad it resolved your issue.
    And thanks for the feedback as well.

    As Winon said, if that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  8. #8
    Registered User
    Join Date
    10-12-2009
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    95

    Re: deleting blank rows issue

    hmmm, it doesn't actually appear to work for me after all. i have a data set 91k rows deep, and the when i run this macro on it, it does nothing. was fine for smaller data sets. is my data too great for it?

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: deleting blank rows issue

    Hi gdallas,


    I believe that prior to Excel 2010 there was a limit of 8192 rows.

    Your profile shows you are using Excel 2007.

    Regards.

+ 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. Having an issue deleting rows based on certain text found in them...
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-04-2014, 05:07 AM
  2. [SOLVED] Issue with deleting Hidden rows after autofilter
    By tamzgha in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-26-2014, 08:14 AM
  3. Changing code from deleting rows to cut/paste rows into another sheet and delete blank row
    By kmarshall6576 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-18-2013, 01:54 AM
  4. Issue with deleting specific rows from a table.
    By skonduru in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-28-2012, 12:10 PM
  5. Having an issue after deleting multiple rows
    By DisposableHero in forum Excel General
    Replies: 6
    Last Post: 11-08-2007, 04:58 PM
  6. Deleting Rows - a new issue
    By iain_clark in forum Excel General
    Replies: 8
    Last Post: 03-09-2007, 01:34 PM
  7. very hard deleting rows issue
    By Lynn Bales in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-11-2005, 06:05 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