|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
代码如下,指标>10,修改对应倍数- Sub aa()
- arr = [f2:i9]
- you = 100
- lie = 0
- For i = 1 To 8
- you0 = arr(i, 4) * 10 + arr(i, 3)
- If arr(i, 2) > 0 Then
- If you > you0 Then
- youi = arr(i, 1)
- you = you0
- ElseIf you = you0 Then
- youi = youi & "*" & arr(i, 1)
- End If
- End If
- lie0 = 1000 - arr(i, 2) * 100 + arr(i, 3) * 10 + arr(i, 4)
- If lie < lie0 Then
- liei = arr(i, 1)
- lie = lie0
- ElseIf lie = lie0 Then
- liei = liei & "*" & arr(i, 1)
- End If
- Next
- [l2] = youi
- [l5] = liei
- End Sub
复制代码 |
|