Hopefully this does what you want:
B1 in sheet 2 has a DropList from which you select the colour you are looking for.
Code finds last row in sheet 2, and clears any data from row 2 to that last row.
Then finds the last row in Sheet 1.
Starting from row 2, code checks if Col A matches the colour you selected in Sheet 2.
If it matches, it copies the data in Col B of that row into next free line of Sheet 2.
If it doesn't match, it moves to the next row on sheet 1
Repeats until it reaches the first blank row in SHeet 1.
Option Explicit
Sub MATCHEDROWS()
Dim F As Long, G As Long, X As Long
Dim sht As Worksheet
G = Sheet2.Cells(Rows.Count, 1).End(xlUp).Row
Sheet2.Range("a2:a" & G).ClearContents
Set sht = Sheet1
With Sheet1
F = .Cells(sht.Rows.Count, "A").End(xlUp).Row
For X = 1 To F
If sht.Cells(X, 1) = Sheet2.Range("B1") Then
G = Sheet2.Cells(Rows.Count, 1).End(xlUp).Row + 1
Sheet2.Range("A" & G) = sht.Range("B" & X)
End If
Next
End With
End Sub
Ochimus
Bookmarks