【VBA】【EXCEL】arr_range

张开发
2026/6/4 13:05:31 15 分钟阅读
【VBA】【EXCEL】arr_range
Option Explicit Option Base 1 Sub test() Dim i, j, lr, lc As Long Dim arr() As Variant lr me.Cells(Rows.Count, ZZ).End(xlUp).Row 替换ZZ lc me.Cells(8888, Columns.Count).End(xlToLeft).Column 替换8888 arr me.Range(Cells(1, 1), Cells(lr, lc)).value2 for i 8888 to lr 替换8888 for j 1 to lc arr(i, j) test next j next i me.Range(Cells(1, 1), Cells(lr, lc)).value2 arr End Sub

更多文章