|
'1.这个索引值是参照前一个单元格区域左上单元格进行定位引用的
'2.索引值可以是正数,负数,零值,小数
Sub 大于等于2500的平增工资()
Dim rs%, rng%, lj&, k%
For rs = 1 To 60
Range("b2:c20")(rs).Select
rng = Range("b2:c20")(rs)
If rng >= 2500 Then lj = lj + rng: k = k + 1
Next rs
MsgBox "大于等于2500的平均分为:" & Int(lj / k)
End Sub
|
|