Hello,
The code below is supposed to loop through rows in column A and then loop through the worksheets in the open workbook and replace the value it finds in column A with column B.
Logically it makes sense to me but the code is not doing its job in replacing the values in the other open workbooks. It is, though, replacing the values in its own workbook.
I would really appreciate any light on this.![]()
Sub WBLoop() Dim rcell As Long Dim wb As Workbook: Set wb = ThisWorkbook Dim wsm As Worksheet: Set wsm = wb.Sheets("BrandList") Dim ws As Worksheet Dim wbk As Workbook For rcell = 1 To 1200 For Each wbk In Workbooks For Each ws In wbk.Worksheets Cells.Replace What:=wsm.Range("A" & rcell).Value, Replacement:=wsm.Range("B" & rcell).Value, LookAt:=xlWhole, _ SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ ReplaceFormat:=False Next Next Next End Sub
Thank in advance![]()











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks