I have this code
Dim ws As Worksheet
Set e = Sheets("Search")
Dim d
Dim j
d = 3
For Each ws In ThisWorkbook.Worksheets
j = 2
Do Until IsEmpty(ws.Range("B" & j))
If ws.Range("B" & j) = e.Range("B2").Text Then
If ws.Range("C" & j) = e.Range("D2").Text Then
d = d + 1
e.Rows(d).Value = ws.Rows(j).Value
e.Range("h" & d) = ws.Name
End If
End If
j = j + 1
Loop
Next ws
I want this macro to search in each worksheet in certains columns for words and if that word is in that column i want it to copy to the worksheet Search. For some reason after searching in the third worksheet it stops.
In my workbook there are 11 worksheets where it should search plus the Search sheet. Can someone help me to find the error?
Bookmarks