+ Reply to Thread
Results 1 to 7 of 7

Delete entire row if column F is blank

  1. #1
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Delete entire row if column F is blank

    I need a macro to look at each row in a sheet and if on that row column F is blank then I want the macro to delete that entire row.

  2. #2
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Delete entire row if column F is blank

    Oops, nevermind. Got it.

  3. #3
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Delete entire row if column F is blank

    I was too hasty. What I have doesn't work. When column F is blank and I run the macro and there is other data in other columns on the same row it does not delete the row. This is my code:
    I want it to start on row 4 and look to the very last row of data.
    Please Login or Register  to view this content.
    My code above only seems to delete one row at a time if the required conditions are met each time I run it.
    Last edited by ScabbyDog; 02-21-2013 at 10:44 AM.

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Delete entire row if column F is blank

    or
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  5. #5
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Delete entire row if column F is blank

    Ah yes thanks John. Anyway to start this code only looking down from row 4?

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Delete entire row if column F is blank

    Why not just filter Column F for blanks and then select all of the resulting rows and delete them? Edit > Delete Row.
    Remove the filter and job done.

    Why the headlong rush to VBa

    [EDIT]
    Apply the filter to Row 3, (Your header Row?)
    Last edited by Marcol; 02-21-2013 at 11:01 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  7. #7
    Valued Forum Contributor
    Join Date
    03-03-2009
    Location
    UK
    MS-Off Ver
    MS365 Subscription Excel for Mac
    Posts
    1,017

    Re: Delete entire row if column F is blank

    This code is part of a much larger piece of code and clearing the blanks in column F from row 4 onwards allows the rest of the code to run properly.

+ 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