+ Reply to Thread
Results 1 to 4 of 4

Return matching string in array if cell contains string contained in the array

  1. #1
    Registered User
    Join Date
    05-03-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Return matching string in array if cell contains string contained in the array

    Hi everyone,

    I have a spreadsheet of web traffic data that I am trying to clean up.

    In column A, I have a bunch of different variants of URLs (google.com, google.co, google.com/search, yahoo.com, http://yahoo.com, ....).

    In column C, I have a bunch of "main" URL groups (google, yahoo, bing,...)

    In column B, I'm looking for a formula to display the appropriate "main" URL string from column C (if applicable), otherwise display the original string contained in column A.

    Any ideas? I was able to create a workaround by inserting a IF(ISERR(FIND()) for each "main" URL value but that quickly made the formula much too long and memory intensive. I would really appreciate any help!

    Thank you!

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Return matching string in array if cell contains string contained in the array

    May be in B1:
    Please Login or Register  to view this content.
    Confirmed with Ctrl-shift-enter
    Attached Files Attached Files
    Quang PT

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Return matching string in array if cell contains string contained in the array

    Hi and welcome to the forum

    It would make it easier if we could see what you have, but try this. you can do a search using wild cards....=vlookup("google"&"*",data_range,1,false)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    05-03-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Return matching string in array if cell contains string contained in the array

    Quote Originally Posted by bebo021999 View Post
    May be in B1:
    Please Login or Register  to view this content.
    Confirmed with Ctrl-shift-enter
    This works great, bebo! I just changed the "" to A1 to display the original string. Thank you!

+ 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