+ Reply to Thread
Results 1 to 6 of 6

Delete rows with blank spaces in column A in multiple worksheets

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    London
    MS-Off Ver
    Excel 2003 Excel 2010
    Posts
    189

    Delete rows with blank spaces in column A in multiple worksheets

    Hi Sir,

    I created a macro as below trying to delete rows which has empty spaces "" in column A. But the macro failed to work properly.

    Please Login or Register  to view this content.
    Can you have a look please? I attached the example file here. Thank you a lot.
    Attached Files Attached Files
    Last edited by alice2011; 08-25-2015 at 08:06 AM.

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527

    Re: Delete rows with blank spaces in column A in multiple worksheets

    Hi Alice,

    Try this (initially on a copy of your data as the results cannot be undone if they're not as expected):

    Please Login or Register  to view this content.
    HTH

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    London
    MS-Off Ver
    Excel 2003 Excel 2010
    Posts
    189

    Re: Delete rows with blank spaces in column A in multiple worksheets

    Hi, Trebor76. Your macro really works perfectly. I was a bit struggling to to make some code similar to yours, but cannot get around the errors. Now you taught me how to use array and range. Thank you very much.

    Alice

  4. #4
    Registered User
    Join Date
    04-22-2013
    Location
    Philippines & Australia
    MS-Off Ver
    Excel 2016, Office 365
    Posts
    73

    Re: Delete rows with blank spaces in column A in multiple worksheets

    Hey Alice, at first I thought this was simple and it probably is but as the rows are deleted then so the cell (c) is affected because the range that has been set has changed. Therefore a quick way around this was to put in a recursive routine maybe not the most elegant but it appears to work.
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527

    Re: Delete rows with blank spaces in column A in multiple worksheets

    then so the cell (c) is affected because the range that has been set has changed
    That is why I set the calculation method to manual (then back to its original setting at the end of the routine).

    Hi, Trebor76. Your macro really works perfectly. I was a bit struggling to to make some code similar to yours, but cannot get around the errors. Now you taught me how to use array and range. Thank you very much.
    You're welcome. If you could mark the thread as solved it would be appreciated.

    Regards,

    Robert

  6. #6
    Forum Contributor
    Join Date
    01-16-2014
    Location
    London
    MS-Off Ver
    Excel 2003 Excel 2010
    Posts
    189

    Re: Delete rows with blank spaces in column A in multiple worksheets

    Many thanks, Catman50. It really helps me. Good learning.

+ 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. [SOLVED] How to use a macro to remove rows whose values in column A equal to blank spaces?
    By billj in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-16-2014, 06:38 AM
  2. Macro to delete blank rows if column I is blank for the row
    By tiger10012 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-10-2013, 03:01 PM
  3. [SOLVED] VBA Find last row and column that contain data and delete all blank rows and blank columns
    By bcn1988 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-03-2012, 01:07 PM
  4. [SOLVED] How to Delete Multiple Consecutive Blank Rows - Delete all Blank Rows
    By raw_geek in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 11-16-2012, 03:17 PM
  5. delete blank rows in multiple worksheets
    By pacman76 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-03-2012, 05:55 AM
  6. Delete Rows if cell value in a column are blank
    By excelrequest in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-11-2010, 01:30 PM
  7. Delete ALL rows that have cell in Column (J) that looks blank
    By Sanne in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2010, 11:10 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