|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Private Sub CommandButton1_Click()
Dim arr, d, i&, j%, k%
Sheet2.Activate
Sheet1.[c3:n88] = ""
arr = Range("a1").CurrentRegion
For j = 3 To 14
Set d = CreateObject("scripting.dictionary")
For i = 3 To UBound(arr)
If Cells(i, j) = "" Then
Else
d(arr(i, j)) = Cells(i, j).Address
End If
Next
For k = 1 To d.Count
With Sheet1.Range(d(Application.Large(d.keys, k)))
.Value = Chr(-24079)
.Font.Color = -11489280
End With
With Sheet1.Range(d(Application.Small(d.keys, k)))
.Value = Chr(-24079)
.Font.Color = -16776961
End With
Next
Next
Sheet1.Activate
Call Sheet1.sumcolor1
Call Sheet1.sumcolor2
End Sub
|
|