Replacin more than 2 letters in a Cell

mmmarks

Active Member
Joined
Jun 4, 2011
Messages
432
Office Version
  1. 2013
Hi Folk,

I have been facing a query. It quite is who knows it. But Its so difficult to me to find exact Formula for it.

My Question is : say A1 cell has a 20 letters like a sequence. Now I want to replace some of them with different letters.
More clear, Let In A1 cell , among 2o letters of word, I want to replace 5th position with different letter And 10th position with different Letter.

Eg :
In A1 Cell,
SQRUSTUIVWXYXABEFGIJ

I want to replace 5th position by the letter "z" and 10th position by the letter "A"


Can anyone help me out plz?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi Aladin Akyurek,

I have some more queries regarding same question which I asked below,
Your solutions were little bit complex. can make it more easy.
Because I have to REPLACE more character in a particular string
For Eg.
String length may be 120 or 320 etc...not fixed
and replacing position also not fixed for each time it may be @ 12th position or it may be 152th position or more.
My View is :
Can you give a method where I will jut enter position of character and replacing my new character into that particular position.
Hope you understood.
 
Upvote 0
Can you give a method where I will jut enter position of character and replacing my new character into that particular position.
Do you mean like this?
Formula copied down.

Excel Workbook
ABCDE
1Position5
2SQRUSTUIVWXYXABEFGIJSQRUZTUIVWXYXABEFGIJReplacementZ
3BBBBBBBBBBBBBBBBBBBZBBBBBBBBBB
REPLACE
 
Upvote 0
What You have answered Its works to only for one position .
We can change only one position
My query is to replace multiple position
 
Upvote 0
Changing position is not fixed. It may 5 times or 10 times . Its depends on Client Requirement.
I can say that its not fixed.
I repeat my question once a again.
I have a sequence which length has let say 200.
I have position numbers (where I need to replace ) to change and New letters.

More Clear...
Source : ABCDEFGHIJKLMN
5T,6U,10W so on.

Question is :
5T :represents --->5 is the position
T :represents ----> new letter
@5th position T has to come.
 
Upvote 0
I have logic but I'm unable to apply that Logic.
My Logic is ..
Create User Form
Then In User Form Give position number where Exactly we need to REPLACE.
Then New character. SO ON...
Once It finished then Click on Finished.
It should be come in a Cell but not in a Original Source Cell .
 
Upvote 0
Hi mmmarks,

You mean to say you have a sequence, suppose it's 'gatttttccc'. Your client says that the 5th position in the sequence which presently is 't' needs to be replaced by 'n', the 7th position ('t' again) with 'p' and the 10th position with 'l'. You also mean to ask that there are many sequences of variable lengths with the specifications to change the original positions in any given sequence with another letter.

Have I correctly understood the question? Kindly let me know.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top