Добрый день.
Вариант макроса VBA Excel:
Sub CopyHighlightedCells()
Dim Product As Range
Dim ProductCell As Range
Dim HCsheet As Worksheet ' ëèñò äëÿ êîïèðîâàíèÿ äàííûõ ñ çàëèâêîé
Dim HPsheet As Worksheet ' ëèñò äëÿ âñòàâêè äàííûõ ñ çàëèâêîé
Set HCsheet = Worksheets("Ëèñò1-copy")
Set Product = HCsheet.Range("B5", HCsheet.Range("B5").End(xlDown))
Set HPsheet = Worksheets("Ëèñò2-paste")
For Each ProductCell In Product
' åñëè ÿ÷åéêà æåëòîãî èëè çåëåíîãî öâåòà
If ProductCell.Interior.ColorIndex = 43 Or ProductCell.Interior.ColorIndex = 44 Then
ProductCell.Resize(1, 4).Copy Destination:= _
HPsheet.Range("B1").Offset(HPsheet.Rows.Count - 1, 0).End(xlUp).Offset(1, 0)
End If
Next ProductCell
HPsheet.Columns.AutoFit
End Sub