+ Reply to Thread
Results 1 to 4 of 4

Eliminate the need for Nested Substitute

  1. #1
    Forum Contributor
    Join Date
    11-28-2008
    Location
    Reykjavík, Iceland
    MS-Off Ver
    Any of: 2003 & 2007
    Posts
    412

    Eliminate the need for Nested Substitute

    Hi,

    Assume A1: ABCDABCDABCD

    If I want to delete all "A"s and "D"s I would use: =SUBSTITUTE(SUBSTITUTE(A1,"A",""),"C","")

    and get: BDBDBD which is fine

    My question:

    Is there a way to use SUBSTITUTE only once ?

    Something like: =SUBSTITUTE(A1,{"A";"C"},"")

    I tried it, with no success.

    All I'm looking for is a WS build-in function.

    Thanks, Elm
    Last edited by ElmerS; 04-09-2010 at 03:25 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Eliminate the need for Nested Substitute

    No; array-entered, the second function returns two results, one deleting As and one deleting Cs. You need the results of one invocation returned to the second.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Eliminate the need for Nested Substitute

    Just reiterating shg's point - no, not really, nothing practical at any rate.

    I asked a similar question at MrExcel.com sometime back which may/may not be of interest - you might like PGC01's response however (post #19)

    http://www.mrexcel.com/forum/showthread.php?t=332284

  4. #4
    Forum Contributor
    Join Date
    11-28-2008
    Location
    Reykjavík, Iceland
    MS-Off Ver
    Any of: 2003 & 2007
    Posts
    412

    Re: Eliminate the need for Nested Substitute

    Thanks.

    It was interesting to read through but I had a HUGE "Déjà vu" reading Oaktrees response (quote):

    "No VBA, no add-ins, no nesting SUBSTITUTEs.... you can't use the letter A in your formula..."

    I hope you understand what I mean by that quoting.

    Elm

+ 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