+ Reply to Thread
Results 1 to 4 of 4

Advice on How to Subsitute/Replace a Text or Number

Hybrid View

  1. #1
    Forum Contributor meyero90's Avatar
    Join Date
    03-24-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    202

    Arrow Advice on How to Subsitute/Replace a Text or Number

    Hello All,

    I'd like your advice on to use the functions substitute or replace in excel with few examples. Of course, I already went to the Excel Help base, but their examples didn't suffice me.
    Basically, let's assume I want to replace a specific word in a cell which is comprised of two words, or comprised of only one word.
    What functions would work best to do that and would this work on numbers as well?

    Assume that:
    A1: Paris France ---> How to you remove Paris in the 1st place and Secondly, How do you keep Paris and remove France.
    ---------And
    A2: Paris France ---> How do you remove Paris and replace it by Monaco (keeping France),

    Thank you guys, any link to this matter would be much appreciated
    Last edited by meyero90; 08-09-2010 at 12:52 PM.
    If I helped, Don't forget to add to my reputation (click on the little scale)
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Advice on How to Subsitute/Replace a Text or Number

    Both require Substitute:

    =Substitute(A1,"Paris","")

    =Substitute(A1,"France","")

    =Substitute(A2,"Paris","Monaco")

    if Paris (or France) appears more than once and you want only to change first, add 1 as a 4th argument.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor meyero90's Avatar
    Join Date
    03-24-2010
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    202

    Re: Advice on How to Subsitute/Replace a Text or Number

    Excellent, Thanks. I was waiting for you to reply to this post

    Last thing, is the above answer valid to substitute numbers as well?

    Cheers

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Advice on How to Subsitute/Replace a Text or Number

    Yes.. numbers don't get put in quotes, though.

+ 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