第1个回答 2017-02-22
Sub ss()
n = Cells(Rows.Count, 12).End(3).Row
arr = Array(6, 14, 33)
For i = 12 To 54
k = Cells(n, i) Mod 3
For j = n - 1 To 20 Step -1
If Cells(j, i) = "" Then Exit For
k1 = Cells(j, i) Mod 3
If k = k1 Then
Cells(j + 1, i).Interior.ColorIndex = arr(k)
End If
k = k1
Next
Next
End Sub