Sub test()
Dim Arr, n%, i&, j&
R = [b65536].End(3).Row
Arr = Range("c47:ay" & R)
For j = 1 To UBound(Arr, 2)
For i = 1 To UBound(Arr) Step 17
If Arr(i, j) = "" Then GoTo 99
If Arr(i, j) = 0 Then n = n + 1
99: Next i
Arr(1, j) = n: n = 0
Next j
Range("c26").Resize(1, 49) = Arr
End Sub作者: ziv976688 時間: 2021-9-28 15:18
如當欄的各"最小"列~都無顯示"0"值時~則顯示""
>> 不好意思,公式不會,2#程式碼只要多個判斷如下僅供參考,謝謝
Sub test()
Dim Arr, n, i&, j&
R = [b65536].End(3).Row
Arr = Range("c47:ay" & R)
For j = 1 To UBound(Arr, 2)
For i = 1 To UBound(Arr) Step 17
If Arr(i, j) = "" Then GoTo 99
If Arr(i, j) = 0 Then n = n + 1
99: Next i
If n > 0 Then Arr(1, j) = n: n = 0
Next j
Range("c26").Resize(1, 49) = Arr
End Sub 作者: ML089 時間: 2021-9-29 09:15