Hi,
i have used the below code to search the list of words i have listed in another. Code works for me except for the header. The first result is to be copied with the header data and then after the results are pasted after the last used without header data.
can some shed some inputs on this pls..
i have used the below code to search the list of words i have listed in another. Code works for me except for the header. The first result is to be copied with the header data and then after the results are pasted after the last used without header data.
can some shed some inputs on this pls..
Code:
Sub search()
lastSrc_rw = Sheets("Keyword").Range("A" & Rows.Count).End(xlUp).Row
MsgBox lastSrc_rw
For Each ksearch In Sheets("Keyword").Range("A1:A" & lastSrc_rw)
With Sheets("Sheet1").Columns(53)
Set c = .Find(car, LookIn:=xlValues, lookat:=xlPart)
If Not c Is Nothing Then
firstAddress = c.Address
Do
nxtDst_rw = Sheets("Keyword_Result").Range("A" & Rows.Count).End(xlUp).Row + 1
c.EntireRow.Copy Destination:=Sheets("Keyword_Result").Range("A" & nxtDst_rw)
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
Next
End Sub