A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Sub Test()
Dim Where As Range, WhereRow As Range, R As Range
Dim C As New Collection
Dim Data, Item
Dim i As Long, j As Long
'Parse the cells
Set Where = Range("A1").CurrentRegion
C.Add Array(Range("A1"), Range("B1"), "Red On")
For Each WhereRow In Where.Rows
For Each R In WhereRow.Cells
If R.DisplayFormat.Interior.Color = vbRed Then
C.Add Array(Range("A" & R.Row), Range("B" & R.Row), Cells(1, R.Column))
Exit For
End If
Next
Next
If C.Count = 0 Then
MsgBox "No Items found"
Exit Sub
End If
'Compile the output
ReDim Data(1 To C.Count, 1 To 3)
For Each Item In C
i = i + 1
For j = 1 To 3
Data(i, j) = Item(j - 1)
Next
Next
'Flush into a new sheet
Worksheets.Add
Range("A1").Resize(UBound(Data), UBound(Data, 2)).Value = Data
End Sub