+ Reply to Thread
Results 1 to 3 of 3

Replace multiple Text in a single line

  1. #1
    Registered User
    Join Date
    01-22-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    19

    Replace multiple Text in a single line

    Hi Excel Experts,

    I am in need of better formula to replace a some text in a long line of text

    I tried to use Replace + Search + Len but it only helps to change 1 specific text. Is there a formula to replace multiple text into multiple different of text?

    My goal is to replace X1 ~ X7 (in column A) to expecting number (in column B)

    Is there a better formula or macro to continue to loop if the numbers filled up to X15 and so on

    I have attached a sample of text replacement in this forum

    Please advise

    Thank You very much

    Regards,
    Richard
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,259

    Re: Replace multiple Text in a single line

    Your initial formula is overcomplicated:

    =SUBSTITUTE($A$2,A5,B5)

    will work. Using formulae, the easiest way is to nest SUBSTITUTE formulae:

    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($A$2,A5,B5),A6,B6),A7,B7)

    adding on as many as needed.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,259

    Re: Replace multiple Text in a single line

    On reflection probably better to use the $'d verrsion:

    =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($A2,$A$5,$B$5),$A$6,$B$6),$A$7,$B$7)

    which can then be copied down, if needed.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Extract multiple text values from a single multi-line cell
    By charliechaz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-31-2019, 10:36 AM
  2. [SOLVED] Edit and replace long text in a single cell
    By adekinteristi in forum Excel General
    Replies: 8
    Last Post: 12-21-2017, 04:36 AM
  3. [SOLVED] Transposing from multiple lines to single line with multiple related columns
    By Seattlites in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-21-2017, 07:32 PM
  4. [SOLVED] Multiple Line Texts to a single line??
    By mandukes in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2014, 03:30 PM
  5. Search and replace text in cell with single character
    By piputty in forum Excel General
    Replies: 1
    Last Post: 08-05-2011, 10:32 PM
  6. Search and replace a line of text in a CSV file
    By tomlancaster in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2010, 09:02 AM
  7. Read the text in a single cell line by line.
    By moon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-14-2010, 06:23 AM

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