Link to home
Start Free TrialLog in
Avatar of Mitch Swetsky
Mitch SwetskyFlag for United States of America

asked on

Excel - how to find value, replace with matching value from another sheet

I need to write a maco that will look for values in an active selection, find match in my "replacement values" and replace with a value in same row. The selection may change each time I use it, but should always be one column.

For example in the attached - in sheet "my diet", if a value is equal to column A in sheet  "replacement values", replace with Column b in sheet "replacement values".
My replacement values worksheet will always be same reference, ie I can save it to hard drive and go back to it, I may add to it so I would like the macro to go to the sheet and repeat until end of data.
 
for example find in my diet where ever it says "apples" and replace with "fruit". Steak will remain as there is no match in replacement values.
Can someone post a simple macro that I can modify and use?
sample.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mitch Swetsky

ASKER

Thank you for your prompt complete suggestion, It worked fine.