Hi, i need some help with a code below, in database there are 3 entreys which should be found bat after runnnig the code is returning only first one.
Thanks for your help
Code:
Sub Go_Click()
Dim ws As Worksheet
Dim ws2 As Worksheet
Set ws = Worksheets("DataBase")
Set ws2 = Worksheets("Review")
Dim What As String
Dim Where As Range
Set Where = ws.Range("B:B")
Dim Found As Range
Dim iRow As Long
Dim firstAddress As String
'find first empty row
iRow = ws2.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).Row
What = ws2.Range("C4")
With Where
Set Found = .Find(What:=What, After:=Range("B2"), LookAt:=xlPart, MatchCase:=False)
If Not Found Is Nothing Then
firstAddress = Found.Address
Do
Found.Copy
ws2.Cells(iRow, 2).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Set Found = .FindNext(Found)
Loop While Not Found Is Nothing And Found.Address <> firstAddress
End If
End With
End Sub
Thanks for your help