+ Reply to Thread
Results 1 to 4 of 4

replace first 1 of a string

  1. #1
    Registered User
    Join Date
    11-09-2011
    Location
    Seville
    MS-Off Ver
    Excel 2007
    Posts
    91

    replace first 1 of a string

    Hi all,

    I have cells of length 5, formatted like text, that include a series of 0 or 1.
    For instance:

    01001
    10010
    00010
    01011
    11100

    I want to replace the first 1 of the string (whatever its position in the string) for a specific value, i.e. an "A".
    Any hint?

    Thanks for any help

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

    Re: replace first 1 of a string

    Ignore this post. I need to learn how to read.
    Last edited by JieJenn; 03-27-2012 at 11:49 AM.

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

    Re: replace first 1 of a string

    Try:

    =SUBSTITUTE(A1,1,"A",1)
    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.

  4. #4
    Registered User
    Join Date
    11-09-2011
    Location
    Seville
    MS-Off Ver
    Excel 2007
    Posts
    91

    Re: replace first 1 of a string

    Thanks, it works.

    Quote Originally Posted by NBVC View Post
    Try:

    =SUBSTITUTE(A1,1,"A",1)

+ 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