+ Reply to Thread
Results 1 to 3 of 3

How to select a worksheet and delete the rows that are 0 or empty on column 3(C)

  1. #1
    Registered User
    Join Date
    05-25-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    11

    How to select a worksheet and delete the rows that are 0 or empty on column 3(C)

    I am using sheet 1 and 2
    I have extracted some data from sheet1 to sheet2
    name of the sheet2 is BP
    I want to write a macro that selects the worksheet "BP" and checks if column 3 or C in BP is empty or 0,If they are 0 or empty then delete the entire row.

    any help would be appreciated!

    Thanks,

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

    Re: How to select a worksheet and delete the rows that are 0 or empty on column 3(C)

    Hi lee478,

    Though I'm surprised you couldn't find any threads to help you on this popular topic, try this (though 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.
    Regards,

    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
    10-13-2012
    Location
    Southern California
    MS-Off Ver
    Excel 2007
    Posts
    401

    Re: How to select a worksheet and delete the rows that are 0 or empty on column 3(C)

    Unless you have one very large spreadsheet, most of column 3 will be empty. (All of the tens of thousands of unused rows.)

    This code looks for data in column 1, and if THAT row has data in it, and there is nothing in column 3 (or 0), it will delete the row.

    It will loop until it sees no more data in column 1, in which case it terminates.

    Please Login or Register  to view this content.
    Last edited by Ed_Collins; 05-26-2013 at 10:47 PM.

+ 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