Results 1 to 3 of 3

How to search substring against row and if duplicates found, remove them?

Threaded View

  1. #1
    Registered User
    Join Date
    09-03-2016
    Location
    ST louis, missouri, usa
    MS-Off Ver
    2013
    Posts
    2

    How to search substring against row and if duplicates found, remove them?

    Desired logic:
    If O2="true" then search (substrings) in e2 against e:e and if (substrings) in e2 are found elsewhere in e:e then delete said substrings from e2, else do nothing, leave cell contents as is.

    e2 looks like:

    http:// ec2-54-172-158-94.compute-1.amazonaws.com/assets/images/bob/asdf1.jpg;http:// ec2-54-172-158-94.compute-1.amazonaws.com/assets/images/bob/asdf2.jpg;http:// ec2-54-172-158-94.compute-1.amazonaws.com/assets/images/bob/asdf3.jpg

    I have inserted spaces after the // to preserve formatting. The semicolon ";" separates substrings. In this case, e2 has the three unique substrings of:

    http:// ec2-54-172-158-94.compute-1.amazonaws.com/assets/images/bob/asdf1.jpg

    http:// ec2-54-172-158-94.compute-1.amazonaws.com/assets/images/bob/asdf2.jpg

    http:// ec2-54-172-158-94.compute-1.amazonaws.com/assets/images/bob/asdf3.jpg

    What I do know:
    1 The amount of substrings in each cell in range e:e are not guaranteed to be the same. Cells may sometimes be blank but will never exceed 12 substrings.
    2)Substrings will ALWAYS start with the http:// file path up UNTIL the word "bob".

    Ask any questions! Thanks! I asked over on mrexcel and couldn't find an answer. I googled but my knowledge of vba isn't sufficient.
    Last edited by joshman10888; 09-03-2016 at 07:50 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Search values and remove all duplicates
    By CJBeaty in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2016, 02:22 PM
  2. remove duplicates based on name found in column b
    By antiKILLER in forum Excel General
    Replies: 2
    Last Post: 03-01-2016, 02:57 PM
  3. Macro to search cells for substring and replace contents of cell if substring is found
    By robbyvegas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2015, 06:40 AM
  4. [SOLVED] Remove duplicates and search last 2 digits only
    By MIFF3436 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2014, 06:02 PM
  5. Remove cells if duplicates found
    By garnerseo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-18-2013, 08:54 AM
  6. Search substring within range, report the substring found
    By Brooke1578 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-20-2012, 03:56 PM
  7. Splitting a row into two when a certain substring is found
    By lifeseeker1019 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-17-2011, 11:32 PM

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