各位好
我利用下列的代碼- Dim N11, N2, N3, N4, N5, MaxRow As Integer
- N11 = Cells(Rows.Count, 2).End(xlUp).Row 'B欄的最後一資料格的列數
- N2 = Cells(Rows.Count, 3).End(xlUp).Row 'C欄的最後一資料格的列數
- N3 = Cells(Rows.Count, 4).End(xlUp).Row
- N4 =Cells(Rows.Count, 5).End(xlUp).Row
- N5 = Cells(Rows.Count, 6).End(xlUp).Row
-
- MaxRow1 = Application.WorksheetFunction.Max(N1, N2, N3, N4, N5) '求出最上述範圍中最大數
複製代碼 找出B至F欄的範圍中的最大列數
想請問各位有沒有其他更快的方式,或是更好的方式,可以達到於特定範圍內找出最大列數
謝謝 |