+ Reply to Thread
Results 1 to 4 of 4

Subsitute or Find/Replace words in a phrase

  1. #1
    Registered User
    Join Date
    05-17-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    6

    Subsitute or Find/Replace words in a phrase

    I'm not sure what is the best option for this request. Ideally I'd like to be able to copy & paste a text string into an excel spreadsheet such as the one below that is then referred back to in order to complete three cells (Headline, Desc 1 and Desc 2) based on the copy version (1-4) in the corresponding [client,city,program,type,variation]. I've attached a spreadsheet so you can see how it is set up, any ideas?Excel Help 2.xlsx

    Text String

    Client City Program Type Variation
    G-Client-CA-NB-Geo-Airdrie-English-Tutor-Homework-Best


    BEFORE
    Copy Headline Desc 1 Desc 2
    1 [client] Learning Center [client] [program] [type]s Can Help Your Child. Get Started Now & Save $25!
    2 [client] [program] Tutors [program] [variation]? Sylvan Tutors Can Help, Call Us Now & Save $25!
    3 [client] in [city] Personal [program] [type]s Can Help Your Child. Get Started Now & Save $25!
    4 [client] Learning Center [city] [program] [type] Can Help Your Child. Start Now & Save $25!

    AFTER
    Copy
    1 Client Learning Center Client English Tutors Can Help Your Child. Get Started Now & Save $25!
    2 Client English Tutors English Homework? Client Tutors Can Help, Call Us Now & Save $25!
    3 Client in Airdrie Personal English Tutors Can Help Your Child. Get Started Now & Save $25!
    4 Client Learning Center Airdrie English Tutors Can Help Your Child. Start Now & Save $25!

  2. #2
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Subsitute or Find/Replace words in a phrase

    write in N9
    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(N3,"[",""),"]",""),"program",$I9),"city",$H9),"type",$J9),"variation",$K9)

    copy right and down

  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,942

    Re: Subsitute or Find/Replace words in a phrase

    Hi and welcome to the forum

    Hopefully Ghozi's suggestion works for you

    If not, to make it easier to understand what you want, I would suggest you upload a sample work book, (all sensitive data removed), showing what data you are working with, a few examples of what your expected outcome is, and how you arrived at that
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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-17-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Subsitute or Find/Replace words in a phrase

    Ghozi - thank you so much for your help, this worked perfectly!! Have a great weekend

+ 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