|
H组h15-hactnet交下卷,老师幸苦!
Sub A1()
Dim x
Dim y
Dim r As String, r1 As String, r2 As String
For x = 2 To Range("B65536").End(xlUp).Row
r1 = Range("B" & x).Address
r2 = Range("B" & x).Offset(4, 0).Address
r = Range("A" & x).Address & ":" & r2
y = Application.Sum(Range(r1 & ":" & r2))
If y > 14 Then
Range(r).Interior.ColorIndex = 6
x = x + 4
End If
Next x
End Sub
Sub A3()
Dim x, y
Dim arr()
arr = Array(13, 2, 3, 4, 6, 7, 8, 9, 22, 32)
x = 5
Range("A1").Resize(UBound(arr) + 1, 1) = Application.Transpose(arr)
Rows(x + 1 & ":" & x + 1).Insert
Range("A" & x + 1) = 100
arr = Application.Transpose(Range("A1:A" & Range("A65536").End(xlUp).Row))
y = UBound(arr)
End Sub
|
|