+ Reply to Thread
Results 1 to 6 of 6

Assist in modifying code to locate an exact phrase in a cell

  1. #1
    Registered User
    Join Date
    09-23-2008
    Location
    Ohio, USA
    Posts
    6

    Post Assist in modifying code to locate an exact phrase in a cell

    Hello, I need help with the below code to find exactly what's listed. Right now if it finds that in any cell in the row it deletes the row (which worked wonderfully for what I needed it to do before). I need to make it find the exact phrase. Usually it's located in column A, once in a while it may be in column B.

    If a sample sheet is needed please advise. It'll take me some time to 'clean up' the data for public posting.

    Edit! - What happens is we have locations such as "A-A-0" and "NA-A-0". I need this code to find just the A-A-0 one and not delete the NA location too.

    Please Login or Register  to view this content.
    The full code was too long, had to delete some but changed the macro to make it work if you try to run it!

    If it's just a simple character addition I'll be pretty darn satisfied
    Last edited by Jsin; 06-23-2010 at 11:00 AM. Reason: Per moderator, my title sucked! Sorry about that though!

  2. #2
    Registered User
    Join Date
    09-23-2008
    Location
    Ohio, USA
    Posts
    6

    Re: Need help modifying code

    My mistake, hopefully the edited title works for the forum rules. I should have known better than to use generalized titles anyway!
    Last edited by shg; 06-23-2010 at 11:29 AM. Reason: deleted quote

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Assist in modifying code to locate an exact phrase in a cell

    Maybe like this:
    Please Login or Register  to view this content.
    Last edited by shg; 07-09-2010 at 02:52 PM. Reason: Added commas at end of each substring
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    09-23-2008
    Location
    Ohio, USA
    Posts
    6

    Re: Assist in modifying code to locate an exact phrase in a cell

    Hello, the code almost works correctly. It seems to miss some of the ones that are in the front or back of a row (eg. Misses L-A-0 sometimes) any advise? There are other ones that it missed, but it always is in the front or back of the rows like below...

    Please Login or Register  to view this content.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Assist in modifying code to locate an exact phrase in a cell

    There should be a comma in the text string at the end of each line, as corrected in my prior example.
    Last edited by shg; 07-09-2010 at 02:52 PM.

  6. #6
    Registered User
    Join Date
    09-23-2008
    Location
    Ohio, USA
    Posts
    6

    Re: Assist in modifying code to locate an exact phrase in a cell

    That did the trick. Thank you very much for the bit of code and your follow up so much later.

+ 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