+ Reply to Thread
Results 1 to 4 of 4

Deleting rows based upon partial cell text

  1. #1
    Registered User
    Join Date
    11-25-2003
    Location
    Decatur, Alabama
    Posts
    94

    Deleting rows based upon partial cell text

    Dear Friends,

    I have read many posts to this forum where a question like my own is posted, except those questions are based upon exact cell values/contents, but not partial contents. So .. I will ask my question below.

    I would like to delete all rows (NOT the header row) where cells in column H DON'T start with the word "Name:" The cell may read "Name: John Doe" or it may read "Name: Sam Smith" or even "Betty." Of these, the row with "Betty" would be deleted, the others would remain.

    Thanks for your help,
    Mike
    Learn to Serve Others. Kindness is far better than the alternative.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Mike

    Try this
    Please Login or Register  to view this content.
    rylo

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello mjwillyone,

    Here is another version that matches "Name:" anywhere in the cell and isn't case sensitive. More code than Rylo's, but a bit more robust if you need it. For all the code, it is still very quick.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525
    try
    No loop
    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)

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