Find and Replace Value based on Info

Art14501

New Member
Joined
Nov 5, 2016
Messages
7
Hi there,

I need a formula that will find duplicate values from Column A and in Column C, then replace the cell value of Column D with the cell values of Column B. For example:

Col A Col B Col C Col D
AAA 0 BBB 15
BBB 5 LLLL 5
CCC 8 FFFF 0
DDD 25 AAA 3
EEE 9 RRR 1
FFF 18 VVV 5
GGG 6 JJJ 9

I was looking at using VLOOKUP and REPLACE or SUBSTITUE, but then I read some articles that MATCH or INDEX was better than VLOOKUP. This is what I come up so far:

=((VLOOKUP(A2,$C$2:$C$200,3,FALSE)

as you can see I get stuck at the replacing value cell. I greatly appreciate any help or advice!


 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Art14501, Good afternoon.

Only with formulas can not do what you need.
You need a MACRO in VBA EXCEL for this task.

I'm sure someone will help you.

Have a nice weekend.
 
Upvote 0
If I understand you correctly, you f.ex. want cell D5 (value 3) to be replaced with the value 0 (from B2), this is from the lookup value "AAA" in A2.
If this is the correct interpretation of what you want, then you can simply delete all values in column D and insert this formula in D2 and drag down:
Code:
=IFERROR(VLOOKUP(C2,A:B,2,FALSE),"No match")
If it's the other way round, inserting values from D column to B column, put this in B2 and drag down:
Code:
=IFERROR(VLOOKUP(A2,C:D,2,FALSE),"No match")
The IFERROR / "No match" -part, is simply the value that shows if no match is found (ie. if f.ex. the value "LLLL" connot be found in the lookup column), change "No match" to whatever you want.
 
Upvote 0

Forum statistics

Threads
1,223,744
Messages
6,174,253
Members
452,553
Latest member
red83

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