Sub color()
Dim index As Integer
Dim strRange As String
For index = 1 To 10000
strRange = "E" + CStr(index)
srtIndex = CStr(index) + ":" + CStr(index)
If (Range(strRange).Value = "1") Then
Rows(srtIndex).Select
With Selection.Interior
.ColorIndex = 1 '1为黑色
.Pattern = xlSolid
End With
End If
Next
End Sub