I need to Find & Replace based on ID#'s between two Sheets. My ID#'s are in column "A", but the data that needs to change is in column "FirstName". I've found a Macro that works except that it changes the ID# instead of the FirstName.
Here is the code:
See example image:Sub multiFindNReplace() Dim myList, myRange Set myList = Sheets("Sheet2").Range("A2:A3") Set myRange = Sheets("sheet1").Range("A2:A28") For Each cel In myList.Columns(1).Cells myRange.Replace what:=cel.Value, replacement:=cel.Offset(0, 1).Value Next cel End Sub
example.jpg
So, in Sheet1 the FirstName "JAMES" should change to "Jimmy", and "RONALD" should change to "Ronny" based off of finding the correct ID#.
However, the current code changes the ID# instead.
med123,
Welcome to the Excel Forum.
For a solution see your cross post here:
http://www.mrexcel.com/forum/showthread.php?t=600081
Have a great day,
Stan
stanleydgromjr
Windows Vista Business, Excel 2003 and 2007
If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks