Avatar of Michael Dobbins
Michael Dobbins
 asked on

VBA: Find and replace based on value of cell

I am trying to find and replace data within a cell based on the value of a cell in a different column.

This is a 3 part update:

Step 1 - Look through column B for one of the agent IDs listed in the macro  (It would need to look for multiple values)
Step 2 - If there is a match to the listed Agent ID, replace the value in column L with X (this would also be stored in the macro as one value)
Step 3 - If there was a change made to column L, change the value in column A to "Y"

Hopefully this makes sense. It would then be stored to my personal macros. So when I export the user file for our phone system, I can make the changes and then upload it back into the phone system for quick updates to the agent skills.

I attached a sample file of what I export.

Here is the list of agent IDs (Column B) it will need to look for:

15344995
15345008
15344996
15393269

Here is the value that would need to replace the current data in column L:

4349850|3;4349892|2;4349893|1

I can do a basic find and replace macro but do not know how to make it based on the value of another cell.

Any help you can provide will be much appreciated!
VBAMicrosoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
byundt

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
byundt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck