+ Reply to Thread
Results 1 to 5 of 5

want help to substitute all letters in a string at the same time

  1. #1
    Forum Contributor
    Join Date
    10-30-2010
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    100

    want help to substitute all letters in a string at the same time

    So I have a string in A1 that goes - (I*B*(E-H*A))/(H*(I*A-H)) and I want to replace or substitute all the letters with their corresponding values in a range.

    I need all the A's to be C78, B's to be G71, etc..

    As Follows:
    A = C78
    B = G71
    E = G68
    H = H66
    I = H68

    In the end it should look like this - (H68*G71*(G68-H66*C78))/(H66*(H68*C78-H66))

    Any efficient ideas on how to accomplish this are much appreciated!

  2. #2
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: want help to substitute all letters in a string at the same time

    Hello trickyricky,

    Please Login or Register  to view this content.
    Last edited by HSV; 03-20-2013 at 06:29 PM.
    Kind regards, Harry.

  3. #3
    Forum Contributor
    Join Date
    10-30-2010
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    100

    Re: want help to substitute all letters in a string at the same time

    Hi and thank-you for your time and response! Yes I see that will work in this instance but I should have been more specific, what if the Letters aren't always the same?

    For example if I wanted to replace a string with letters say in a 'list 1' with values in a 'list 2' how could I do this?

    Otherwise I would have to constantly update the code for different instances telling it what to update with what, and that could get old pretty quick haha!

  4. #4
    Valued Forum Contributor
    Join Date
    02-12-2011
    Location
    The Netherlands
    MS-Off Ver
    365
    Posts
    818

    Re: want help to substitute all letters in a string at the same time

    Here's an example with in c1 the evaluate.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    10-30-2010
    Location
    Kansas, USA
    MS-Off Ver
    Excel 2010
    Posts
    100

    Re: want help to substitute all letters in a string at the same time

    Hi again! I see this is better and can make this work!

    However just wondering a bit if there is no simpler way than having to use Replace(Replace(Replace(Replace(Replace( a bunch of times in case one might have a looong list of replacements to make?

    Thanks so much!

+ 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