+ Reply to Thread
Results 1 to 2 of 2

Replacing or Substituting Text

  1. #1
    Naya
    Guest

    Replacing or Substituting Text

    I'm trying to substitute/replace text in one cell for another text in another
    cell. I don't want the return value to be the original text or a "#VALUE!" in
    the new cell if it does not find the text to replace. PLEASE HELP. I'm going
    crazy.

    Here is an example:

    A1 value is Brown Donkey
    A2 value is Purple Butterfly
    A3 value is Brown Dog
    A4 value is Pink Panther

    If I use the substitute formula for Column B to replace Brown with BLUE,
    this is what I get:

    B1 value is BLUE Donkey
    B2 vlaue is Purple Butterfly
    B3 value is BLUE Dog
    B4 value is Pink Panther

    HERE IS THE DESIRED RESULT:

    B1 value is Blue Donkey
    B2 value is " "
    B3 value is Blue Dog
    B4 value is " "

    "" (quotes) represent blank cells. PLEASE HELP!



  2. #2
    Rowan
    Guest

    Re: Replacing or Substituting Text

    Try:

    =IF(ISERROR(SEARCH("Brown",A1)),"",SUBSTITUTE(A1,"Brown","Blue"))

    Note Seach is not case sensitive while Substitute is.

    Hope this helps
    Rowan

    Naya wrote:
    > I'm trying to substitute/replace text in one cell for another text in another
    > cell. I don't want the return value to be the original text or a "#VALUE!" in
    > the new cell if it does not find the text to replace. PLEASE HELP. I'm going
    > crazy.
    >
    > Here is an example:
    >
    > A1 value is Brown Donkey
    > A2 value is Purple Butterfly
    > A3 value is Brown Dog
    > A4 value is Pink Panther
    >
    > If I use the substitute formula for Column B to replace Brown with BLUE,
    > this is what I get:
    >
    > B1 value is BLUE Donkey
    > B2 vlaue is Purple Butterfly
    > B3 value is BLUE Dog
    > B4 value is Pink Panther
    >
    > HERE IS THE DESIRED RESULT:
    >
    > B1 value is Blue Donkey
    > B2 value is " "
    > B3 value is Blue Dog
    > B4 value is " "
    >
    > "" (quotes) represent blank cells. PLEASE HELP!
    >
    >


+ 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