+ Reply to Thread
Results 1 to 5 of 5

If column dont contain 0 then delete row

  1. #1
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    If column dont contain 0 then delete row

    Goodday hope someone can help

    I have an array in Column H with 1300 rows, I need a Macro or a formula to do the following -If no 0 in array then delete all row that dont contain the 0. Sample below.Any help greatly appreciated. It must go through the whole column and delete. I have a macro but it does not delete all the cells.Thanx for any help

    1, 17, 0, 40, 17 Qualifies it have a 0
    1, 17, 8, 9, 40 >>>>>>>>>>>Must be deleted
    1, 17, 14, 3, 40 >>>>>>>>>>>Must be deleted
    1, 17, 17, 0, 40 >>>>>>>>>>>Qualifies
    1, 17, 17, 40, 0
    1, 17, 17, 40, 0
    1, 17, 40, 9, 8 >>>>>>>>>>>>Must be deleted
    1, 17, 40, 5, 12
    1, 17, 40, 1, 16>>>>> Must be deleted
    1, 0, 25, 9, 40 >>>>>>>>>>>Qualifies
    1, 25, 3, 40, 6 >>>>>>>>>>>Must be deleted
    1, 25, 5, 40, 4 >>>>>>>>>>>Must be deleted

    Please Login or Register  to view this content.
    Ricklou

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,107

    Re: If column dont contain 0 then delete row

    Here, try this:

    Please Login or Register  to view this content.
    Last edited by zbor; 10-13-2012 at 05:31 AM.
    Never use Merged Cells in Excel

  3. #3
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: If column dont contain 0 then delete row

    as an option
    Please Login or Register  to view this content.
    Last edited by nilem; 10-13-2012 at 04:54 AM.

  4. #4
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Re: If column dont contain 0 then delete row

    Quote Originally Posted by zbor View Post
    Here, try this:

    Please Login or Register  to view this content.
    This code works flawlessly...........!!!!Zbor thank you so much!!!!!!!!!!!!!!!! Solved

  5. #5
    Forum Contributor
    Join Date
    07-01-2012
    Location
    ZA
    MS-Off Ver
    Excel 2013
    Posts
    300

    Re: If column dont contain 0 then delete row

    Quote Originally Posted by nilem View Post
    as an option
    Please Login or Register  to view this content.
    Thank you for your code, I will try it aswell.......Zbor's did the trick though.

+ 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