+ Reply to Thread
Results 1 to 16 of 16

how to change some text with certain letter string, but not all text that contains string

  1. #1
    Registered User
    Join Date
    04-24-2017
    Location
    SD, CA
    MS-Off Ver
    pro
    Posts
    8

    how to change some text with certain letter string, but not all text that contains string

    Need to change "Sch" to "School" in many cells but do not want to replace "Schwartz"(or any other word that contains Sch in it) with "School". I have tried substitute and replace functions, but it even changes "Schwartz". Thanks for help! I'm spending way too much time on this! Darn It!

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: how to change some text with certain letter string, but not all text that contains str

    Under Replace, check Match entire cell contents to replace your texts.
    4-24-2017 2-47-19 PM.jpg
    Attached Images Attached Images

  3. #3
    Registered User
    Join Date
    04-24-2017
    Location
    SD, CA
    MS-Off Ver
    pro
    Posts
    8

    Re: how to change some text with certain letter string, but not all text that contains str

    I've done this and get error: we couldn't find what you were looking for. click options for more ways to search

    how to I put a screen shot on here?
    Attached Images Attached Images

  4. #4
    Registered User
    Join Date
    04-24-2017
    Location
    SD, CA
    MS-Off Ver
    pro
    Posts
    8

    Re: how to change some text with certain letter string, but not all text that contains str

    I keep getting error "couldn't find what your looking for"

    Having trouble posting screen shot
    Attached Images Attached Images

  5. #5
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: how to change some text with certain letter string, but not all text that contains str

    Can you post a sample file and as well as results you expected.

  6. #6
    Registered User
    Join Date
    04-24-2017
    Location
    SD, CA
    MS-Off Ver
    pro
    Posts
    8

    Re: how to change some text with certain letter string, but not all text that contains str

    What it is now: What I need:
    Schafer Park Elementary Schafer Park Elementary
    McNeel Sch - Vacca Campus McNeel School - Vacca Campus
    Sequoyah Sch - Chalkville Campus Sequoyah School - Chalkville Campus

    In one column, I have a list of schools, I need the abbreviation "Sch" changed to "School" but NOT if "sch" is within a name. I have over 100,000 to sort through so I need to know the formula for many cells.
    Attached Images Attached Images
    Last edited by waiting4utopia; 04-24-2017 at 07:21 PM.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: how to change some text with certain letter string, but not all text that contains str

    waiting4utopia welcome to the forum.

    Try it this way.
    • Select all the data relevant in column A.
    • Bring up Find and Replace.
    • In the Find what text box type Sch and be sure to include a trailing space ... Ex. "Sch " ... without the quotes.
    • In the Replace with what text box type School and be sure to also include a trailing space.
    • Click Replace All.

    If this still doesn't work try uploading a small sample Excel workbook.

    If you are not familiar with how to do this:

    To attach a file to your post,
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”
    • be sure to desensitize the data
    The file name will appear at the bottom of your reply.
    Dave

  8. #8
    Registered User
    Join Date
    04-24-2017
    Location
    SD, CA
    MS-Off Ver
    pro
    Posts
    8

    Re: how to change some text with certain letter string, but not all text that contains str

    I attempted to attach workbook. I've tried the space after sch and school but it didn't work. Thanks for your help.
    Attached Files Attached Files

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: how to change some text with certain letter string, but not all text that contains str

    Quote Originally Posted by waiting4utopia View Post
    I attempted to attach workbook. I've tried the space after sch and school but it didn't work. Thanks for your help.
    That's because the data in the upload isn't like in the screen shot. Each is at the end of the string.

    If the upload isn't a comprehensive representation of what you are working with we're likely to have a high fail rate on any solutions.

    In the meantime try this formula in B2 and fill down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    A
    B
    1
    Needs Changed
    2
    Northwest Prep Charter
    Northwest Prep Charter
    3
    Jack London Elementary
    Jack London Elementary
    4
    Morrice Schaefer Charter
    Morrice Schaefer Charter
    5
    Schallenberger Elementary
    Schallenberger Elementary
    6
    William R Martin Middle Sch
    William R Martin Middle School
    7
    Valley Grande Elem Sch
    Valley Grande Elem School
    8
    Tipton Middle Sch
    Tipton Middle School
    9
    Southside Primary Sch
    Southside Primary School
    10
    Southside High Sch
    Southside High School
    11
    JE Terry Elem Sch
    JE Terry Elem School
    12
    Dallas Co High Sch
    Dallas Co High School
    13
    Brantley Elem Sch
    Brantley Elem School
    14
    Keith Middle-High Sch
    Keith Middle-High School
    15
    Bruce K Craig Elem Sch
    Bruce K Craig Elem School
    16
    Salem Elem Sch
    Salem Elem School

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: how to change some text with certain letter string, but not all text that contains str

    Another possibility could be.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    04-24-2017
    Location
    SD, CA
    MS-Off Ver
    pro
    Posts
    8

    Re: how to change some text with certain letter string, but not all text that contains str

    I attempted to give an adequate representation, but I have a large amount of data, so I'm doing the best that I can not knowing exactly what you require.

    The formula you gave me works for data if "sch" is at the end of the string.

    But I have data that has "sch" within the string that needs changed, i.e.:

    McNeel Sch - Vacca Campus - Needs changed to McNeel School - Vacca Campus
    Schwartz Elementary - Don't want to change: Schwartz Elementary

  12. #12
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: how to change some text with certain letter string, but not all text that contains str

    Or try this ...

    =TRIM(SUBSTITUTE(A2&" ","Sch ","School "))

  13. #13
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: how to change some text with certain letter string, but not all text that contains str

    I copied and pasted the examples from post #11 and did the "Sch " "School " find and replace. It worked at my end.

    Is it possible there is no space in your real data? I.e. Sch is followed immediately by -? I couldn't tell from the screen shot.

    Try find and replace with "Sch-" > "School-".

    If you upload again please include some examples of Sch in the middle of the string as in the screen shots.

  14. #14
    Registered User
    Join Date
    04-24-2017
    Location
    SD, CA
    MS-Off Ver
    pro
    Posts
    8

    Re: how to change some text with certain letter string, but not all text that contains str

    Looks like this one worked! Wow, super complicated! Thank you for your time

  15. #15
    Registered User
    Join Date
    04-24-2017
    Location
    SD, CA
    MS-Off Ver
    pro
    Posts
    8

    Re: how to change some text with certain letter string, but not all text that contains str

    I should say that Flameretired's second formula worked! Wow! complicated!

  16. #16
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: how to change some text with certain letter string, but not all text that contains str

    You're welcome. Glad to hear it works,and thank you for the feedback.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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-27-2016, 12:30 AM
  2. Search for a Text string starting with a certain Letter
    By Siva Karthik in forum Excel General
    Replies: 3
    Last Post: 11-22-2015, 10:37 AM
  3. Storing complex text string into variable. Text string contains html or xml code.
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-20-2015, 04:54 AM
  4. Replies: 2
    Last Post: 05-14-2015, 01:30 PM
  5. [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
  6. [SOLVED] formula for looking at a text string for a letter
    By cwheeler116 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-24-2013, 03:24 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