+ Reply to Thread
Results 1 to 2 of 2

VBA code to delete rows if empty cell in column A in a workbook

  1. #1
    Registered User
    Join Date
    09-28-2017
    Location
    Leeds, England
    MS-Off Ver
    2013
    Posts
    7

    Red face VBA code to delete rows if empty cell in column A in a workbook

    Hi,

    I am quite new to Excel so not very good at this!

    I need to write a VBA code that goes through every worksheet in a workbook, and deletes an entire row if it is blank.
    This can be done based on an empty cell in column A.

    I also need to combine every worksheet in the workbook onto one big spreadsheet

    Thanks in advance!!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,436

    Re: VBA code to delete rows if empty cell in column A in a workbook

    Record a macro ... AutoFilter column A to select blank cells, select the visible rows, except the header, and delete them (using the delete icon on the ribbon). Then clear the filter.

    After that, it's just a case of looping through all the worksheets doing the same thing.

    Try it and come back if you have problems.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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. Replies: 3
    Last Post: 03-12-2017, 06:23 PM
  2. Delete empty rows with VBA code
    By Motox in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-22-2015, 02:49 AM
  3. How to delete rows based on whether or not a cell in column B is empty or null
    By Seth_ in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-25-2014, 04:35 PM
  4. Delete Rows Based On Empty Cell in Column Works Perfectly For A, but Not J
    By votekinky06 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-27-2014, 05:41 PM
  5. Code Amendment - Delete Empty Rows
    By TextMonkey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2013, 08:03 AM
  6. [SOLVED] still have empty cell after run Delete empty cells code
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-25-2012, 04:28 PM
  7. [SOLVED] delete empty rows in workbook
    By TooN in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-10-2006, 06:25 AM

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