Color cell Y1 to whatever color you want to collect from the range of grades, then click the button to collect them. Here's the code:
Option Explicit
Sub MatchColor()
Dim MyColor As Long
Dim LastRow As Long
Dim MyRange As Range
Dim cell As Range
MyColor = Range("Y1").Interior.ColorIndex
LastRow = Range("L" & Rows.Count).End(xlUp).Row
Set MyRange = Range("M3:T" & LastRow)
Range("Y3:Y" & LastRow).Clear
For Each cell In MyRange
If cell.Interior.ColorIndex = MyColor Then _
cell.Copy Range("Y" & cell.Row)
Next cell
Set MyRange = Nothing
End Sub
Bookmarks