+ Reply to Thread
Results 1 to 4 of 4

Deleting Entire Row Based on Criteria in single cell

  1. #1
    Registered User
    Join Date
    04-07-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    22

    Deleting Entire Row Based on Criteria in single cell

    Preface: I am learning VBA as I go over the last three weeks, so please explain any solutions like i'm a complete idot. Thank you so much in advance for any help.


    Prefered:

    I want to Delete an entire row based on a criteria in column D (Criteria:= "REMOVAL BLANKET")

    Or

    Acceptable:

    I would Like to Delete all Visible Rows from a Flitered Selection of Colum D.

    My Current code is
    :
    See ISSUE 1: I need to get the entire row selected to delete. cant seem to scipt it right

    Please Login or Register  to view this content.
    Last edited by Leith Ross; 04-07-2011 at 03:46 PM. Reason: Added Code Tags

  2. #2
    Valued Forum Contributor Charles's Avatar
    Join Date
    02-10-2004
    Location
    Biloxi
    MS-Off Ver
    Windows 7, Excel 2003,2007 & Mac2011
    Posts
    845

    Re: Deleting Entire Row Based on Criteria in single cell

    Hi,

    Welcome to the forum.

    Paste the following code to a module. Test on copy file.
    This will start at the bottom of column D and then go to row 2 of column D.
    When it see your criteria it should remove that row and then continue to the next row.

    Please Login or Register  to view this content.
    Charles

    There are other ways to do this, this is but 1 !
    Be Sure you thank those who helped.
    IF YOU'RE SATISFIED BY ANY MEMBERS RESPONSE TO YOUR ISSUE PLEASE USE THE STAR ICON AT THE BOTTOM LEFT OF THE POST UNDER THEIR NAME.

  3. #3
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Deleting Entire Row Based on Criteria in single cell

    Have a look at the "Using The Range Object's Autofilter Method" example on the link below; it should give you a pretty good idea how to go about it.

    http://www.xtremevbtalk.com/showpost...70&postcount=4

    Note that it doesn't use the Selection object at all.
    Hope that helps,

    Colin

    RAD Excel Blog

  4. #4
    Registered User
    Join Date
    04-07-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Deleting Entire Row Based on Criteria in single cell

    thanks for the help guys, I did manage to get some code to work to my liking. I would like to beter understand how to delet the rows from a filter using spcialcells.... didnt quiet understand the link you posted collin.

+ 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