+ Reply to Thread
Results 1 to 3 of 3

Deleting rows containing certain values

  1. #1
    Registered User
    Join Date
    09-08-2010
    Location
    Switzerland
    MS-Off Ver
    Excel 2003
    Posts
    13

    Deleting rows containing certain values

    Hi all,

    I want to delete rows containing certain values: For example, this is a rough picture of what i have:

    Name1 Name2 Value
    Amy Eric 24
    Ted Chris 18
    Jon Liza 20
    Amy Eric 11
    Amy Annie 15

    I would like to delete "Amy" from the column "Name1". How do i go about doing it?

    Many thanks!

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Deleting rows containing certain values

    Try this in a standard module
    Please Login or Register  to view this content.

    Hope this helps

    [EDIT]
    If you just want to delete "Amy" and not the whole row use Replace > Find What:= "Amy" > Replace With:= Leave this field blank
    Last edited by Marcol; 09-14-2010 at 07:38 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Deleting rows containing certain values

    Another option using filtering, which is faster than looping.
    User is prompted via an input box to enter the name, which is passed to the filter as the critiera.

    Note: this code uses the sheet code name -- not the worksheet name. You can replace "Sheet1" with "ActiveSheet" to make the code a bit more generic.

    Please Login or Register  to view this content.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

+ 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