Sub color()
Dim index As Integer
Dim strRangeO As String
Dim strCol As String
Dim strrangeQ As String
Dim strRangeN As String
Dim strRangeH As String
For index = 3 To 1000
strrangeQ = "q" + CStr(index)
strRangeO = "o" + CStr(index)
strRganeH = "h" + CStr(index)
strIndex = CStr(index) + ":" + CStr(index)
ElseIf (Range(strRangeO).Value > 30) And (Range(strRangeH).Value = f) Then
Range(strrangeQ).Value = "在保修期中"
Rows(strIndex).Select
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
Selection.Font.ColorIndex = 1