Excel 如何获取很多列中的某行的最大行号
发布网友
发布时间:2022-04-29 17:26
我来回答
共2个回答
热心网友
时间:2023-10-23 14:39
Sub aa()
Dim m, n, arr, brr, crr
Dim rng As Range
Set rng = Sheet10.UsedRange
arr = rng
brr = Application.WorksheetFunction.Transpose(arr)
ReDim crr(1 To UBound(brr, 1))
For m = 1 To UBound(brr, 1)
n = 1
Do While brr(m, n) <> ""
If n < UBound(brr, 2) Then
n = n + 1
Else
n = n + 1
GoTo 10:
End If
Loop
10: crr(m) = n - 1
Next
Sheet10.Cells(UBound(brr, 2) + 2, 1).Resize(1, UBound(brr, 1)) = crr
End Sub
热心网友
时间:2023-10-23 14:40
从sheet中有限的几列数据中找出最大值以及最大值所在列中的最小值。
请看附件。
附件:2008-4-17 000.xls
热心网友
时间:2023-10-23 14:39
Sub aa()
Dim m, n, arr, brr, crr
Dim rng As Range
Set rng = Sheet10.UsedRange
arr = rng
brr = Application.WorksheetFunction.Transpose(arr)
ReDim crr(1 To UBound(brr, 1))
For m = 1 To UBound(brr, 1)
n = 1
Do While brr(m, n) <> ""
If n < UBound(brr, 2) Then
n = n + 1
Else
n = n + 1
GoTo 10:
End If
Loop
10: crr(m) = n - 1
Next
Sheet10.Cells(UBound(brr, 2) + 2, 1).Resize(1, UBound(brr, 1)) = crr
End Sub
热心网友
时间:2023-10-23 14:40
从sheet中有限的几列数据中找出最大值以及最大值所在列中的最小值。
请看附件。
附件:2008-4-17 000.xls
热心网友
时间:2023-10-23 14:39
Sub aa()
Dim m, n, arr, brr, crr
Dim rng As Range
Set rng = Sheet10.UsedRange
arr = rng
brr = Application.WorksheetFunction.Transpose(arr)
ReDim crr(1 To UBound(brr, 1))
For m = 1 To UBound(brr, 1)
n = 1
Do While brr(m, n) <> ""
If n < UBound(brr, 2) Then
n = n + 1
Else
n = n + 1
GoTo 10:
End If
Loop
10: crr(m) = n - 1
Next
Sheet10.Cells(UBound(brr, 2) + 2, 1).Resize(1, UBound(brr, 1)) = crr
End Sub
热心网友
时间:2023-10-23 14:40
从sheet中有限的几列数据中找出最大值以及最大值所在列中的最小值。
请看附件。
附件:2008-4-17 000.xls