+ Reply to Thread
Results 1 to 4 of 4

Deleting row with condition

  1. #1
    Registered User
    Join Date
    12-17-2008
    Location
    Singapore
    MS-Off Ver
    2002
    Posts
    71

    Deleting row with condition

    I have a workbook with hundred of worksheets.

    I would like to have a macro that will loop through every sheet, except for the first sheet,"Summary". It will delete rows if it is empty row and the entire row does not contain "Captured" in the whole row.

    When the row is deleted it will shift the row up.

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: Deleting row with condition

    Hi there,

    There's some clarification needed here:
    It will delete rows if it is empty row and the entire row does not contain "Captured" in the whole row.
    An empty row cannot have any cell which contains the value "Captured".

    Do you want to delete all empty rows and all non-empty rows which do not have a cell containing the value "Captured"?

    Regards,

    Greg M

  3. #3
    Registered User
    Join Date
    12-17-2008
    Location
    Singapore
    MS-Off Ver
    2002
    Posts
    71

    Re: Deleting row with condition

    sorry typo error , should be: It will delete rows if it is empty row or the entire row does not contain "Captured" in the row.

    I forget to mention that the search will only start on the row 2 of every worksheet except Summary

    After deleted, it will shift the row up
    Last edited by kaffal; 03-15-2009 at 12:47 PM.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Deleting row with condition

    Your post does not comply with Rule 8 of our Forum RULES. Cross-posting is when you post the same question in other forums on the web. You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post. Expect cross-posts without a link to be closed a message will be posted by the moderator explaining why. We are here to help so help us help you!
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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