Cells(1, 1).End(xlDown).Rowではなく、Cells(Rows.Count, 1).End(xlUp).Rowの方が良さそうだ。
'Snippets for VBA 'Get maxRow and maxClm Dim maxRow As Long maxRow = Cells(Rows.Count, 1).End(xlUp).Row 'the last Row of column A maxClm = Cells(1, Columns.Count).End(xlToLeft).Column 'max Column of row 1
0 件のコメント:
コメントを投稿