|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
- Sub t()
- Dim arr, brr, crr, x%, y%, z%, i%
- i = 1
- arr = Array(1, 2, 4, 6)
- brr = Array(5, 6, 7, 8)
- crr = Array(3, 4, 6, 7, 8)
- For x = 0 To 3
- For y = 0 To 3
- For z = 0 To 4
- If (arr(x) + brr(y) + crr(z)) Mod 10 = 3 Or (arr(x) + brr(y) + crr(z)) Mod 10 = 4 Or (arr(x) + brr(y) + crr(z)) Mod 10 = 7 Or (arr(x) + brr(y) + crr(z)) Mod 10 = 8 Or (arr(x) + brr(y) + crr(z)) Mod 10 = 9 Then
- If Application.Max(arr(x), brr(y), crr(z)) - Application.Min(arr(x), brr(y), crr(z)) = 4 Or Application.Max(arr(x), brr(y), crr(z)) - Application.Min(arr(x), brr(y), crr(z)) = 5 Or Application.Max(arr(x), brr(y), crr(z)) - Application.Min(arr(x), brr(y), crr(z)) = 6 Or Application.Max(arr(x), brr(y), crr(z)) - Application.Min(arr(x), brr(y), crr(z)) = 7 Then
- Range("a" & i) = 100 * arr(x) + 10 * brr(y) + crr(z)
- i = i + 1
- End If
- End If
- Next z
- Next y
- Next x
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|