Replace a specific character in a serie of words (strings)

Hello everyone,

I don't if what I am asking is feasible with Excel.

Basically I have multiple columns that will help me to generate a value in the final one (to generate a computer name).

Example:

Column1 (for location) will have:
H
W
S

ColumnX (for computer name) will therefore get or replace in the character number 6 of its string the value of the cell in column 1 for that row.

xxxxxHxxxx
xxxxxWxxxx
xxxxxSxxxx

So is there a way to automatize this ? I did not find what I wanted with REPLACE.

Thank you ! :)


  • Edited by DamienB11 Saturday, May 31, 2014 2:32 PM
May 31st, 2014 5:31pm


Re:  Replace character in string

From your description, the Replace function should work.
What do you mean by "did not find what I wanted"?
'---

Jim Cone
Portland, Oregon USA
https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2

  • Edited by James Cone Sunday, June 01, 2014 12:00 AM rephrased
Free Windows Admin Tool Kit Click here and download it now
June 1st, 2014 2:58am

Well the replace does not actually work because it needs "something" to be replaced and I did not succeed to build a single cell with multiple replace imbricated
June 1st, 2014 7:28pm

re: replace something?

Well, I don't still understand, but maybe...

If you have the word "Mississippi" in cell A5 then this formula...
  =SUBSTITUTE(A5,"i","U")
will return...  mUssUssUppU

While...
  =REPLACE(A5,2,1,"E")
will return...  mEssissippi

Otherwise, post before and after examples.
'---
Jim Cone
free & commercial excel programs
https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2

Free Windows Admin Tool Kit Click here and download it now
June 1st, 2014 8:17pm

Hi,

According to your description, my understanding is that you want to insert the value of column 1 to value of column X as the sixth character.

If it is, please try the two method:

1. Use the replace forum which Mr. Jim mentioned above.

=REPLACE(B1,5,1,A1)

2. Split/merge the column x

=LEFT(B1,5)&A1&RIGHT(B1,LEN(B1)-5)

Thanks

George Zhao
Forum Support
________________________________________
Come back and mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback on our support, please click "tnfsl@microsoft.com"

  • Marked as answer by DamienB11 1 hour 5 minutes ago
June 2nd, 2014 9:00am

Hi,

According to your description, my understanding is that you want to insert the value of column 1 to value of column X as the sixth character.

If it is, please try the two method:

1. Use the replace forum which Mr. Jim mentioned above.

=REPLACE(B1,5,1,A1)

2. Split/merge the column x

=LEFT(B1,5)&A1&RIGHT(B1,LEN(B1)-5)

Thanks

George Zhao
Forum Support
________________________________________
Come back and mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback on our support, please click "tnfsl@microsoft.com"

  • Marked as answer by DamienB11 Saturday, June 07, 2014 9:51 AM
Free Windows Admin Tool Kit Click here and download it now
June 2nd, 2014 9:00am

Hi,

Just checking in to see if the information was helpful. Please let us know if you would like further assistance.

Thanks

George Zhao
Forum Support
________________________________________
Come back and mark the replies as answers if they help and unmark them if they provide no help.
If you have any feedback on our support, please click "tnfsl@microsoft.com"

June 6th, 2014 4:09am

Since, you wanted 6th character to be replaced in column X (let's say B) by column 1, hence if you data starts in row 1, you will need to use following formula and drag down the formula for other rows of column B

=REPLACE(B1,6,1,A1)

Free Windows Admin Tool Kit Click here and download it now
June 7th, 2014 2:00am

Thank you everyone.

Sorry for the late answer, I was a bit busy at work.

The way George Zhao approached it gave me the solution of what I wanted. Thank you ! :)
June 7th, 2014 5:55am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics