+ Reply to Thread
Results 1 to 4 of 4

Formula for multiple word replacements

  1. #1
    Registered User
    Join Date
    02-29-2012
    Location
    Gold Coast, Australia
    MS-Off Ver
    Excel 2010
    Posts
    20

    Smile Formula for multiple word replacements

    Hi,

    Thanks in advance for reading my task. I’m having so much trouble working this out.
    I’m looking for help in writing 1 formula which would produce several replacements of some words with other words. Here is my example which would all be contained in one cell:

    <a title="Contact us for details" href="http://www.hair-extensions-suppliers.com.au/contact-us/" target="_blank">Contact us for details</a>
    <a title="Where is" href="http://www.hair-extensions-suppliers.com.au/where-is/" target="_blank">Where Is</a>
    <a title="Frequently Asked Questions" href="http://www.hair-extensions-suppliers.com.au/frequently-asked-questions/" target="_blank">Frequently Asked Questions</a>

    Result required:
    eg: replace <a title="Contact us for details" with <a title="Contact Melissa for details”.
    “Melissa” would be in a separate column on the spreadsheet and so the word “us” would be replaced with “Melissa”.

    Replace <a title="Where Is" with <a title="Melissa is in Los Angeles, California".
    Los Angeles and California would each be in separate columns on the spreadsheet.

    Replace <a title="Frequently Asked Questions" with <a title="Your Questions Answered by Melissa Hayes"
    Hayes would also be in a separate column on the spreadsheet.

    Mail merge is not working for me. I would like use a database or spreadsheet.

    Thank you so much for your help

  2. #2
    Forum Contributor
    Join Date
    08-04-2014
    Location
    Riga
    MS-Off Ver
    2010
    Posts
    579

    Re: Formula for multiple word replacements

    I only know how to do it with 3 separate substitutions, sorry.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-30-2014
    Location
    Pittsburgh,PA
    MS-Off Ver
    Office 2010, Home Student 2013
    Posts
    62

    Re: Formula for multiple word replacements

    I preseumed you wanted both the element text and the tag text changed. It was a bit unclear to me.

    Please Login or Register  to view this content.
    You may not have recognized that you have both "Where is" and "Where Is" in your original text. That requires four substitutions.

    It would be easier to review if the substitutions were made one at a time, but you can probably adapt this nested solution to that if you look at bmouse's post.

    Please Login or Register  to view this content.
    Last edited by thisoldman; 10-12-2015 at 09:51 AM.

  4. #4
    Registered User
    Join Date
    02-29-2012
    Location
    Gold Coast, Australia
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Formula for multiple word replacements

    Thank you. I got it worked out from both your suggestions and it is working great.

+ 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. [SOLVED] Replacements on 2 column glossary
    By greek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2013, 02:13 AM
  2. Random Sampling with no Replacements
    By kitty425 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-15-2013, 01:04 AM
  3. Additions, removals and replacements
    By deltree86 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-11-2013, 10:48 AM
  4. Multiple replacements from one column to another
    By frndelavega in forum Excel General
    Replies: 3
    Last Post: 06-06-2011, 09:21 PM
  5. Multiple replacements in single string?
    By JP Romano in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-15-2010, 06:16 PM
  6. Condition based replacements of Cells with other values
    By vamshi57 in forum Excel General
    Replies: 5
    Last Post: 09-30-2010, 06:15 PM
  7. [SOLVED] Stop excel from reporting replacements
    By Chris in forum Excel General
    Replies: 1
    Last Post: 01-06-2005, 10:06 PM

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