|
- Sub 按钮1_Click()
- Application.ScreenUpdating = False
- arr = Range("a1:z31")
- For j = 2 To UBound(arr)
- If Len(arr(j, UBound(arr, 2))) > 0 And j <> 32 Then
- x = WorksheetFunction.CountA(Cells(j, 1).Resize(1, UBound(arr, 2)))
- If x < UBound(arr, 2) Then
- a = UBound(arr, 2) - x
- sm = arr(j, UBound(arr, 2))
- For i = 2 To UBound(arr, 2) - 1
- If Len(arr(j, i)) = 0 Then
- If a Mod 2 = 0 Then
- arr(j, i) = Int(sm / a - 0.5)
- sm = sm - arr(j, i)
- a = a - 1
- Else
- arr(j, i) = Int(sm / a + 0.5)
- sm = sm - arr(j, i)
- a = a - 1
- End If
- End If
- Next i
-
- End If
- End If
- Next j
- Range("a1:z31") = arr
- Application.ScreenUpdating = True
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|