+ Reply to Thread
Results 1 to 4 of 4

Deleting blank rows using loop and SpecialCells

  1. #1
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327

    Deleting blank rows using loop and SpecialCells

    Hi all,

    Trying to work through a column and delete rows where any cell in Col G is empty.

    Using this

    Please Login or Register  to view this content.
    will find the first blank cell and delete that row but because it's working its way down the sheet instead of up it then misses the next blank row and therefore is not working as I would like it to.

    Can anyone help me in perhaps working through the sheet backwards while still using SpecialCells(xlCellTypeBlanks) as I think this would be fasgter than looping through each and every cell in Col G.

    Many thanks

    Seamus

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,525
    No loop required
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-04-2008
    Location
    Oneida, NY
    Posts
    13
    If you select Column G and then run the below it will delete the entire row that has an empty cell.

    Please Login or Register  to view this content.
    I find that this one line of code works great because it can be used on different columns and is not specialized to a column or certain number of rows.

  4. #4
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327
    Thanks to both of you - I should have known that!

    Regards

    Seamus

+ 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