|
Public Sub 红()
Dim bj, kb
Dim bs As Range
Dim i, j, k As Integer
For Each bs In Range("b6:ao23")
If bs.Interior.Color = 255 Then bs.Interior.PatternColor = xlNone
Next
kb = Range("b6:ao23")
bj = Range("BI3:BZ3")
For i = 2 To UBound(bj, 2)
If bj(1, i) <> 0 Then
For j = 1 To UBound(kb, 2)
If kb(bj(1, i), j) = bj(1, 1) Then Cells(bj(1, i) + 5, j + 1).Interior.Color = 255: k = k + 1
Next
End If
Next
Cells(4, "bl") = k
End Sub
Public Sub 黄()
Dim bj, kb
Dim bs As Range
Dim i, j, k As Integer
For Each bs In Range("b6:ao23")
If bs.Interior.Color = 65535 Then bs.Interior.PatternColor = xlNone
Next
kb = Range("b6:ao23")
bj = Range("BI9:BZ9")
For i = 2 To UBound(bj, 2)
If bj(1, i) <> 0 Then
For j = 1 To UBound(kb, 2)
If kb(bj(1, i), j) = bj(1, 1) Then Cells(bj(1, i) + 5, j + 1).Interior.Color = 65535: k = k + 1
Next
End If
Next
Cells(10, "bl") = k
End Sub
Public Sub 绿()
Dim bj, kb
Dim bs As Range
Dim i, j, k As Integer
For Each bs In Range("b6:ao23")
If bs.Interior.Color = 5287936 Then bs.Interior.PatternColor = xlNone
Next
kb = Range("b6:ao23")
bj = Range("BI15:BZ15")
For i = 2 To UBound(bj, 2)
If bj(1, i) <> 0 Then
For j = 1 To UBound(kb, 2)
If kb(bj(1, i), j) = bj(1, 1) Then Cells(bj(1, i) + 5, j + 1).Interior.Color = 5287936: k = k + 1
Next
End If
Next
Cells(16, "bl") = k
End Sub
|
|