+ Reply to Thread
Results 1 to 8 of 8

How can I replace a word from a sentence in a cell & substitute word from another cell

Hybrid View

  1. #1
    Registered User
    Join Date
    09-11-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    31

    Post How can I replace a word from a sentence in a cell & substitute word from another cell

    How can I replace a word from a sentence in a cell and substitute the word from another cell.
    example:

    A1 > apple
    A2 > banana
    A3 > carrot
    .
    .
    A100 > grape

    B1 > I ate food this morning (using ONLY cell B1 as source of sentence)

    **this is the OUTPUT after replacing word "food"
    C1 > I ate apple this morning
    C2 > I ate banana this morning
    C3 > I ate carrot this morning
    .
    .
    C100 > I ate grape this morning
    Last edited by rionoah; 09-11-2012 at 08:03 AM. Reason: missing statement

  2. #2
    Registered User
    Join Date
    09-11-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: How can I replace a word from a sentence in a cell & substitute word from another cell

    replace "food" with value from cell A

  3. #3
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Slough
    MS-Off Ver
    Excel 2007
    Posts
    469

    Re: How can I replace a word from a sentence in a cell & substitute word from another cell

    Hi,

    Try
    ="I ate "&A1&" this morning"
    Then of course just drag the formula down as far as it needs to go.

    Hope this helps,

    Danny
    Last edited by DannyJ; 09-11-2012 at 08:18 AM. Reason: Added more detail to the post

  4. #4
    Registered User
    Join Date
    09-11-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: How can I replace a word from a sentence in a cell & substitute word from another cell

    Thank you very much Danny for your help.

  5. #5
    Registered User
    Join Date
    09-11-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: How can I replace a word from a sentence in a cell & substitute word from another cell

    Thanyou for your help.

  6. #6
    Forum Contributor
    Join Date
    08-23-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    163

    Re: How can I replace a word from a sentence in a cell & substitute word from another cell

    Yes...DannyJ is abslutely right.
    However in case if you want to use the formula only then below might help

    =SUBSTITUTE($B$1,"food",$A1)

  7. #7
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Slough
    MS-Off Ver
    Excel 2007
    Posts
    469

    Re: How can I replace a word from a sentence in a cell & substitute word from another cell

    Thanks Nested,

    Your way would probably work smoother overall. Just to make it clearer for rionoah, B1 has I ate food this morning and C1 is the word you want to substitute in. I know it's obvious, you can never make something too easy!

    Regards

    Danny

  8. #8
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Slough
    MS-Off Ver
    Excel 2007
    Posts
    469

    Re: How can I replace a word from a sentence in a cell & substitute word from another cell

    No worries.

    I would suggest using Nested's way of doing it though as it is much simpler. If you want an example of how to do it that way I will be happy to knock one up.

    If your question is answered please make to sure to mark the topic solved.

    Thanks

    Danny

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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