Give this version a go...tx jindon
Sub Extract2()
Dim Valu, Temp(), i As Long, cnt As Long
With Sheet1.Cells(1).CurrentRegion.Resize(, 28)
Valu = .Value: cnt = 0
For i = 1 To UBound(Valu, 1)
If Valu(i, 1) = Sheet2.Range("A1") And Valu(i, 11) = Sheet2.Range("B1") Then
ReDim Preserve Temp(cnt)
If Not IsNumeric(Application.Match(Valu(i, 28), Temp, 0)) Then
Temp(cnt) = Valu(i, 28)
cnt = cnt + 1
End If
End If
Next i
End With
Sheet2.Range("A3").Resize(cnt) = Application.WorksheetFunction.Transpose(Temp)
End Sub
EDit...Forgot...
Are you able to remove duplicates from within that code?
Sheet2.Columns("A:A").RemoveDuplicates 1
Bookmarks