0
我主要想找到工作簿A中的單元格在工作簿B中的哪個單元格。工作簿B中每個工作表單元格都是紅色的,所以找到的單元格應該變得沒有填充(如此代碼的底部所示)。問題在於我的第二個循環,我不太確定如何使用工作簿A中複製的單元格搜索工作簿B,或者如果有更高效的方法來完成此操作。如何從一個工作表中的不同工作表中查找行?
Sub Macro7()
Dim jcolumn As Range
wsht = InputBox("Enter Name of bucket: ")
Workbooks("A").Worksheets(wsht).Activate
For Each cell In Columns("J:J")
cell.Copy
Workbooks("B").Worksheets(wsht).Activate
Columns("J:J").Select
For Each icell In Columns("J:J")
jcolumn.Find(cell).Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Next
Next
End Sub