+ Reply to Thread
Results 1 to 5 of 5

Search cell A1 for text string from B1, replace with text string from C1

  1. #1
    Registered User
    Join Date
    12-13-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    61

    Search cell A1 for text string from B1, replace with text string from C1

    Example:
    A1 = Mickey Mantle Baseball Cards
    B1 = Mickey Mantle
    C1 = Mantle, Mickey


    Desired output:
    D1 = Mantle, Mickey Baseball Cards

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Search cell A1 for text string from B1, replace with text string from C1

    Try this in D1:

    =SUBSTITUTE(A1,B1,C1)

  3. #3
    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: Search cell A1 for text string from B1, replace with text string from C1

    Hi,

    This is clearly a much simplified example and probably doesn't represent the size of your actual data. We often find that when we give an answer to what is a trivial non representative example when the solution is used with the real world data it doesn't work because of factors like string length and other stuff which is important but hasn't been mentioned.

    Therefore upload your real workbook (or at least a cut down copy), and manually add the results you expect to see. Clearly identify which is original data and which are the results and in a note clearly explain how you have arrived at your results.

    That said and for the example given

    D1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    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.

  4. #4
    Registered User
    Join Date
    12-13-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Search cell A1 for text string from B1, replace with text string from C1

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    This is clearly a much simplified example and probably doesn't represent the size of your actual data. We often find that when we give an answer to what is a trivial non representative example when the solution is used with the real world data it doesn't work because of factors like string length and other stuff which is important but hasn't been mentioned.

    Therefore upload your real workbook (or at least a cut down copy), and manually add the results you expect to see. Clearly identify which is original data and which are the results and in a note clearly explain how you have arrived at your results.

    That said and for the example given

    D1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This worked perfectly! Thank you so much!

  5. #5
    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: Search cell A1 for text string from B1, replace with text string from C1

    My pleasure and thanks for the rep.

+ 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. Replies: 2
    Last Post: 05-14-2015, 01:30 PM
  2. [SOLVED] Search for a text string and return given text string to adjacent cell
    By hecgroups in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-14-2015, 04:50 AM
  3. Help Automating or trying to come up with a way to search and replace a text string.
    By workerbee12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-29-2014, 03:14 PM
  4. [SOLVED] Find partial text string within another text string return original text into cell.
    By mikey42979 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-17-2013, 02:58 PM
  5. [SOLVED] VBA to Search a Text String, Find a Value listed in another column and replace the text
    By Jschrod303 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-16-2012, 08:56 PM
  6. Search Selected Data for a Text String and replace entire cell with new tex
    By maz003 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2010, 02:26 PM
  7. Search for specific text in a string and replace
    By VegasL in forum Excel General
    Replies: 5
    Last Post: 12-04-2009, 04:45 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