+ Reply to Thread
Results 1 to 5 of 5

Remove rows with custom data in a column

  1. #1
    Registered User
    Join Date
    02-16-2005
    Location
    Dubai, UAE
    MS-Off Ver
    365
    Posts
    40

    Lightbulb Remove rows with custom data in a column

    Hi everyone,

    I found below code on the forum to find rows in a list of data that contain a certain value in the column D.
    I have 2 questions to ask to the forum and hope somebody can help ;-)

    1.) Rather than hard-coding, I would like the "user" to have the possibility to insert the values he wants to have removed.
    Those values would be in SHEET "CONFIG" from B10:B20. So what is below as "PINCO" and "PALLO", would be a user-defined list of criteria, so the code below would have to change into a loop.

    2.) I would like to have some kind of "if is error, then don't do anything" routine in there, because sometimes maybe not ALL cell values are found, so I don't want the macro to stop, just to ignore the error and proceed.

    Please Login or Register  to view this content.
    Thanks for your help, I am sure this solution will be helpful to others. Also: please don't suggest to manually filter and delete rows, I want to automate that to avoid having to filter and delete rows ;-)


    Thanks, TItus

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Remove rows with custom data in a column

    Does this help?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-16-2005
    Location
    Dubai, UAE
    MS-Off Ver
    365
    Posts
    40

    Re: Remove rows with custom data in a column

    Hi John,

    thanks for your time. Actually, I'd rather have that instead of a dialog, the script picks up all values that are in B10 to B20 (one in each cell).
    Also, the script gives me an error if the data can't be found...

    Thanks for your help!
    Titus

  4. #4
    Registered User
    Join Date
    02-16-2005
    Location
    Dubai, UAE
    MS-Off Ver
    365
    Posts
    40

    Re: Remove rows with custom data in a column

    I attached a sample to illustrate the requirement.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Remove rows with custom data in a column

    Not sure I'm following you. Especially about the user selections. Maybe you can refine my first code with this code. Or let me know what needs to be changed.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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