+ Reply to Thread
Results 1 to 12 of 12

Removing specific words from cell

  1. #1
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Removing specific words from cell

    hi there

    i have a range of 1000 rows where it states city and "sales rep"

    i want in cell B1 to show remove "Sales Rep" from the cell. below are some examples of the data points:
    Ottawa Sales Rep = "Ottawa"
    Sacramento Sales Rep = "Sacramento"
    Long Island Sales Rep = "Long Island"

    can someone pls help me with a formula? as u can see there are instances where some cities have two words i.e. Long Island

    thanks alot!

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Removing specific words from cell

    Hi,

    =TRIM(SUBSTITUTE(A1,"Sales Rep",""))

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Removing specific words from cell

    cant you just find/replace sales rep with nothing?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: Removing specific words from cell

    Quote Originally Posted by martindwilson View Post
    cant you just find/replace sales rep with nothing?
    hello martindwilson

    I would but i will have to do this again each week so it would be nice to have a formula.

    thanks for the help.

  5. #5
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: Removing specific words from cell

    Quote Originally Posted by XOR LX View Post
    Hi,

    =TRIM(SUBSTITUTE(A1,"Sales Rep",""))

    Regards
    hello

    that works great thank you

    one more question....is it possible to add a "wildcard" in that? for example, anything that contains "sales r*"??

    there are a few examples where the data is "Miami Sales Rp" or "New Jersey Sales R"

    thxs.

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Removing specific words from cell

    Unfortunately wildcards do not work within the SUBSTITUTE function.

    Perhaps:

    =TRIM(SUBSTITUTE(A1,MID(A1,FIND("Sales R",A1),FIND(" ",A1,FIND("Sales R",A1)+6)-FIND("Sales R",A1)),""))

    Regards

  7. #7
    Forum Contributor
    Join Date
    11-26-2010
    Location
    usa
    MS-Off Ver
    Office 365
    Posts
    1,224

    Re: Removing specific words from cell

    hello there

    i placed your formula:
    =TRIM(SUBSTITUTE(C2,MID(C2,FIND("Sales R",C2),FIND(" ",C2,FIND("Sales R",C2)+6)-FIND("Sales R",C2)),""))

    but getting #value error on the first entry.

    the first entry is Hawaii Sales Rep

    ?

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Removing specific words from cell

    Apologies.

    Try:

    =TRIM(SUBSTITUTE(C2,MID(C2,FIND("Sales R",C2),FIND(" ",C2&" ",FIND("Sales R",C2)+6)-FIND("Sales R",C2)),""))

    Regards

  9. #9
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Removing specific words from cell

    or
    =IF(ISNUMBER(SEARCH("sales r",C2)),LEFT(C2,SEARCH("sales r",C2)-2)&MID(C2,SEARCH(" ",C2&" ",SEARCH("sales r",C2)+7),255),C2)

  10. #10
    Registered User
    Join Date
    09-17-2013
    Location
    Kent
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Removing specific words from cell

    Hello, I wonder if someone can help me to remove part of entries in cells leaving me with just names in order that I can sort by same. I have nearly 4000 entries and so could take me some time if I do them individually. This is what is in my cells:

    36,"0847363341","SMITH,ALEX","SMIT02","","9"," ","1",50,40,60,0,0,0,0,0,0,"1",250000,0,1378290997,N,N,N,N,N,Y,Y,N,Y,N,N,1378290997,"","","",0

    Here's hoping,

    purpleaddy

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Removing specific words from cell

    purpleaddy welcom to the forum BUT
    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  12. #12
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Removing specific words from cell

    hi jw01. if you just want everything before "sales r" like in all your egs, maybe this simple one will do:
    =LEFT(C2,SEARCH("sales r",C2)-1)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ 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] Removing Numbers from a Cell and only keep Words?
    By dksodhi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-08-2012, 08:42 AM
  2. Need formula for removing words from a cell.
    By Luke Andrews in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-06-2012, 06:11 AM
  3. Removing words from a cell
    By nirnetx in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-13-2009, 06:11 PM
  4. Help in removing certain words in a cell
    By xLioneLx in forum Excel General
    Replies: 4
    Last Post: 06-24-2008, 10:28 PM
  5. removing a space between words in a cell
    By JenBasch in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-19-2005, 08:05 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