How to replace a list of different words with a specific word in excel? Experts help req

Abbas999

Board Regular
Joined
Jan 4, 2015
Messages
102
Hi Experts,

I am really in need of yours help. I am using Excel 2007 Version. I have around 3000 rows of data in excel and in each row there is a text "AB10" I want all of "AB10" replaced with different series of words.

"AB10" Replaced with "A1"
"AB10" Replaced with "A2"
"AB10" Replaced with "A3"
"AB10" Replaced with "A4"
"AB10" Replaced with "A5"
"AB10" Replaced with "A6"


and so on for 3000 rows.

I believe that experts will have solution for this problem.

Note - I'm newbie!

Thanks in advance
 
@Abbas999
did you see post #9?
i belive is the solution
let me know
 
Upvote 0

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
@Abbasss999
this my solution
let me know if fit you!

AB
1<what>bars</what><where><where>AB10</where></where><what>bars</what><where><where>Z10</where></where>

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B1=REPLACE(A1,SEARCH("AB",A1),2,"Z")

<tbody>
</tbody>

<tbody>
</tbody>

Excel tables to the web - Excel Jeanie Html 4

@GerryZ Thanks you for your reply. But this will not help me.

here is what i want.

OLD LineZip CodesI want this final line
<Where>AB10</Where>
CA1

<tbody>
</tbody>
<Where>CA1</Where>
<Where>AB10</Where>
EC4P

<tbody>
</tbody>
<Where>EC4P</Where>
<Where>AB10</Where>
DA16

<tbody>
</tbody>
<Where>DA16</Where>
<Where>AB10</Where>
G73

<tbody>
</tbody>
<Where>G73</Where>

<tbody>
</tbody>

Is there a way to tell excel to Copy data from Column B "Zip Codes" and Enter it in column 3 between <Where></Where>

thank you
 
Upvote 0
MAYBE:
<table border="1" cellspacing="0" cellpadding="0" style="font-family:Calibri,Arial; font-size:14pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="width:30px; " /><col style="width:368.8px;" /><col style="width:424px;" /></colgroup><tr style="background-color:#cacaca; text-align:center;font-size:8pt; "><td > </td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">A</td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">B</td></tr><tr style="height:21px ;" ><td style="border-width:3; border-style:solid;border-color:#f0f0f0; background-color:#cacaca; text-align:center; " >20</td><td ><what>bars</What><Where><Where>AB10</Where></td><td ><what>bars</What><Where><Where>ZA1</Where></td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b>Spreadsheet Formulas</b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >B20</td><td >=REPLACE(A20,SEARCH<span style=' color:008000; '>("AB",A20)</span>,4,"ZA"&ROWS<span style=' color:008000; '>(B$20:B20)</span>)</td></tr></table></td></tr></table> <br />Excel tables to the web - Excel Jeanie Html 4
 
Upvote 0
MAYBE:
AB
20<what>bars</what><where><where>AB10</where></where><what>bars</what><where><where>ZA1</where></where>

<colgroup><col style="width:30px; "><col style="width:368.8px;"><col style="width:424px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B20=REPLACE(A20,SEARCH("AB",A20),4,"ZA"&ROWS(B$20:B20))

<tbody>
</tbody>

<tbody>
</tbody>

Excel tables to the web - Excel Jeanie Html 4

not working
 
Upvote 0
Based on your DROPBOX spreadsheet layout... basically it is what Andrew gave you before you made clear you were substituting from another column....

In B2

=SUBSTITUTE(A2,"AB10",C2)
 
Upvote 0
Another pic for understanding my need.
2r29lpk.png
 
Upvote 0
Based on your DROPBOX spreadsheet layout... basically it is what Andrew gave you before you made clear you were substituting from another column....

In B2

I think this is working @MARK858 But i am a newbie and i don't know how to run a formula. I have copy the formula "=SUBSTITUTE(A2,"AB10",C2)" and it converts th First row only how to do that for 3000 rows? Column C have all the zip codes and Column A have the data that needs to be replaced with zip codes. Please tell me what i am doing wrong?
 
Upvote 0
If there is something in every row in Column A hover your cursor over the bottom right corner of the cell with the formula, then when then cursor changes to a black + double left click and it will autofill the column.

If you have blank cells in column A then when it changes to a + left click & hold and drag down.
 
Upvote 0

Forum statistics

Threads
1,216,105
Messages
6,128,861
Members
449,472
Latest member
ebc9

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