tryingharder
New Member
- Joined
- Mar 10, 2022
- Messages
- 4
- Office Version
- 2016
- Platform
- Windows
Hi,
I'm looking to use the replace to change a known value to another value.
but i have multiple values to i want to list them all out in a sheet and loop
once i've replaced the values in the list i want to loop and do the same in another work book
for example my list is
but my code isn't working
Sub replace()
'
' replace Macro
'
'
Windows(Range("S14").Value).Activate 'CHANGE THIS WHEN YOU WANT TO USE THE MLPL NOT THE TEST SHEET
Range("D6:D7").Select
Range("D6").Activate
Selection.replace What:=(Range("N14").Value), Replacement:=(Range("O14").Value), _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
Windows("macro copy replace.xlsm").Activate
End Sub
I'm looking to use the replace to change a known value to another value.
but i have multiple values to i want to list them all out in a sheet and loop
once i've replaced the values in the list i want to loop and do the same in another work book
for example my list is
Change from | Change to |
3037364 | 3055059 |
3055059 | 3055019 |
3055019 | 3081093 |
3081093 | 3055065 |
3055065 | 3081094 |
3081094 | 3055020 |
3055020 | 3037364 |
but my code isn't working
Sub replace()
'
' replace Macro
'
'
Windows(Range("S14").Value).Activate 'CHANGE THIS WHEN YOU WANT TO USE THE MLPL NOT THE TEST SHEET
Range("D6:D7").Select
Range("D6").Activate
Selection.replace What:=(Range("N14").Value), Replacement:=(Range("O14").Value), _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:= _
False, ReplaceFormat:=False
Windows("macro copy replace.xlsm").Activate
End Sub