+ Reply to Thread
Results 1 to 6 of 6

Is there a formula for replacing a symbol with text from another cell?

  1. #1
    Registered User
    Join Date
    01-20-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    13

    Is there a formula for replacing a symbol with text from another cell?

    time entry worksheet.xls
    The attached worksheet is an example of what I am trying to do in my master spreadsheet. In the "Description" field, the text has the symbols '*' and '**'. The information in the two following columns (Who? and Content?) are supposed to be inserted into the Description field, replacing the asterisks. Is there a formula that can be created to do this? I'm still a newbie and this is way over my head!

    Thanks in advance!
    Last edited by alannanoelle; 01-20-2012 at 07:10 PM.

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Is there a formula for replacing a symbol with text from another cell?

    In cell D2 try the formula:

    =SUBSTITUTE(SUBSTITUTE(A2,"**",C2),"*",B2)

    Is that doing what you're looking for?

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Is there a formula for replacing a symbol with text from another cell?

    alannanoelle,

    In cell D2 and copy down:
    =REPLACE(REPLACE(A2,FIND("*",A2),1,B2),FIND("**",A2)+LEN(B2)-1,2,C2)
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Is there a formula for replacing a symbol with text from another cell?

    Andrew-R beat me to it, and he did it the smart way, go backwards, lol

  5. #5
    Registered User
    Join Date
    01-20-2012
    Location
    California
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Is there a formula for replacing a symbol with text from another cell?

    Perfect, thank you!

  6. #6
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Is there a formula for replacing a symbol with text from another cell?

    Quote Originally Posted by tigeravatar View Post
    Andrew-R beat me to it, and he did it the smart way, go backwards, lol
    People often call my formula backwards, but this is the first time it's sounded like a compliment

+ 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