Sub SortColours()
Dim limit As Long
Dim c As Long
Columns(1).Insert shift:=xlToLeft
limit = Cells(Rows.Count, 2).End(xlUp).Row
For c = 1 To limit
If Cells(c, 2).Interior.ColorIndex = 3 Then
Cells(c, 1) = 1
Else: Cells(c, 1) = 0
End If
Next c
End Sub