+ Reply to Thread
Results 1 to 2 of 2

FIND string in cells and DELETE (or COLOR) rows

  1. #1
    Registered User
    Join Date
    05-08-2014
    Location
    croatia
    MS-Off Ver
    Excel 2010
    Posts
    18

    Question FIND string in cells and DELETE (or COLOR) rows

    Hi all,
    Example.xlsx

    I am continuing my VBA education and have the following problem to solve. In the attached spreadsheet I need to:

    - in column A find all cells that have ".hr" as part of the string inside cell (this ".hr" can be anywhere but it's important that characters are in that particular order; it's the domain extension)
    - delete these rows

    I believe that a certain combination of FIND or VLOOKUP and DELETE ROWS functions is need but am unsure how to right to right code. If it is too complicated to directly delete them, coloring these cells will also work fine (I can then sort rows by color, put colored ones on top, select them manually and simply right click> delete). Programmatic way would be favored though.

    Many thanks for any help and all the best in this new year!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: FIND string in cells and DELETE (or COLOR) rows

    Hi,

    The simplest way would be to put the following function in I2 and copy it down

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    The filter the whole list for the word "Delete" in column I, select all those rows and hit delete.
    This could of course also be automated in a macro once you confirm the essential process is doing what you want.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Find cells in colum A that do not contain a number and delete their rows
    By khalloran in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-17-2014, 07:04 PM
  2. Replies: 1
    Last Post: 09-11-2014, 10:59 AM
  3. Macro To Find Rows With Duplicates, Compare Cells, And Delete Rows. - Excel
    By Kwame001 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-26-2013, 10:41 AM
  4. Replies: 13
    Last Post: 08-23-2011, 11:00 AM
  5. How to find a string and change it's color?
    By jp001 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-12-2009, 08:36 AM

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