Replace one column data with data from another column

ioacym1

New Member
Joined
Apr 4, 2014
Messages
4
Hi,

I'm looking for a desperate answer regarding my problem, so if you have any suggestion please help:

I have 3 columns who look like this:

A B C
PT 199 BragareasaPT 199 BragareasaPT 199 Bragareasa
6 INDPT 130 Grindu
11INDPT Parc 5 Grindu
7/483 INDPT 5 Grindu
378 INDPT378 Independenta
9 INDPT9 Independeta

<tbody>
</tbody>

In column A i have one list with some location's name; in B list i have another list with some athore location name. My task is to highlight the difference betwen column A and B and put the result in C. I managed to do this up to a point where the column name differ; so if you can se above i have in column A 9 IND and in column B PT9 Independenta they refer to the same location but the format is different.
So my question is:
Is there a method that can automatically replace the name in column A from B, to have a perfect match? something similar to "Find and replace" function but to do it automatically, and have to overwright myself??


Please help! It's something urgent for my work; so i would very much appreciate any god ideea.

Thank you!
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
If you insert a new column in A so the original column A, B and C now become B,C and D and put the following formula in A1 and copy it down then you can compare columns A and C to do your comparision.

=IFERROR(IF(FIND(LOWER(B1),LOWER(C1),1)<>"",C1,""),B1)

Cheers
 
Upvote 0
Thanks, but it's not quite what i want, your formula just copy the column B into column A; so my D column with the final result remains the same. What i want is to search of matching proprieties in column B and if something is very close, modify the column A value after column B value. Like my previous exemple:
A B C
9 IND PT 9 INDEPENDENTA FALSE (NOW IS FALSE BECAUSE THE VALUE FROM A DOSEN'T MATCH WITH THE COLUMN B VALUE)

so i wonder if i can add another column; let's say column A1 that looks up and compare A with B and if it finds a close match then to write it down.


a1 A B C
A<>B=PT 9 INDEPENDENTA 9 IND PT 9 INDEPENDENTA FALSE (NOW IS FALSE BECAUSE THE VALUE FROM A DOSEN'T MATCH WITH THE COLUMN B VALUE)
 
Upvote 0
Thanks, but it's not quite what i want, your formula just copy the column B into column A; so my D column with the final result remains the same. What i want is to search of matching proprieties in column B and if something is very close, modify the column A value after column B value. Like my previous exemple:
A B C
9 IND PT 9 INDEPENDENTA FALSE (NOW IS FALSE BECAUSE THE VALUE FROM A DOSEN'T MATCH WITH THE COLUMN B VALUE)

so i wonder if i can add another column; let's say column A1 that looks up and compare A with B and if it finds a close match then to write it down.


a1 A B C
A<>B=PT 9 INDEPENDENTA 9 IND PT 9 INDEPENDENTA FALSE (NOW IS FALSE BECAUSE THE VALUE FROM A DOSEN'T MATCH WITH THE COLUMN B VALUE)

Well I'm surprised to hear you say that the formula only copies the B column to the A column. In my file it does what I believed you requested. Ok lets take lines 3 & 4 as an example and see if we agree on the same result.

PT 199 BragareasaPT 199 BragareasaPT 199 BragareasaPT 199 Bragareasa
6 IND6 INDPT 130 Grindu
11IND11INDPT Parc 5 Grindu
7/483 IND7/483 INDPT 5 Grindu
PT378 Independenta378 INDPT378 Independenta
PT9 Independeta9 INDPT9 Independeta

<colgroup><col span="4"></colgroup><tbody>
</tbody>

Above is the result I get do you get this result
Lines 3 show Columns A & B to be the same because B is not contained in C at all
However looking at
Line 4 shows A is the same as C because B is contained in C

I hope that demonstrates clearly what I was doing

Please confirm and if you have any problem I will sent a link to the file so you can see.

Cheers
 
Upvote 0
I wasn't sure whether you only wanted to test each value against its neighbor or anywhere in the column so I've listed two ways.

Check Neighbor
D1:=IF(ISERROR(SEARCH(A1,B1)>0),FALSE,TRUE)
and copy down

Check all Column B
For each value in Column A it will identify a similar address or an #NA error.


Try the following array formula.

Sheet1

ABCD
1PT 199 BragareasaPT 199 BragareasaPT 199 BragareasaPT 199 Bragareasa
26 INDPT 130 Grindu#N/A
311INDPT Parc 5 Grindu#N/A
47/483 INDPT 5 Grindu#N/A
5378 INDPT378 IndependentaPT378 Independenta
69 INDPT9 IndependetaPT9 Independeta

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
D1{=INDEX(B$1:B$6,MATCH(MIN(MIN(IF(ISERROR(SEARCH(A1,B$1:B$6)),9.999E+307,SEARCH(A1,B$1:B$6))),256),IF(ISERROR(SEARCH(A1,B$1:B$6)),9.999E+307,SEARCH(A1,B$1:B$6)),0))}

<tbody>
</tbody>

<tbody>
</tbody>

Formula Array:

Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!


Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0

Forum statistics

Threads
1,215,050
Messages
6,122,868
Members
449,097
Latest member
dbomb1414

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