'最終行を取得する(A列を基準)
dim cnt as long
cnt = Cells(Rows.Count, 1).End(xlUp).Row
又は
cnt = Cells(Rows.Count, "A").End(xlUp).Row
’最終列を取得する(1行目を基準)
cnt=cells(1,Columns.Count).End(xlToLeft).Columnデータの最終行と列を取得
Cell
Cell'最終行を取得する(A列を基準)
dim cnt as long
cnt = Cells(Rows.Count, 1).End(xlUp).Row
又は
cnt = Cells(Rows.Count, "A").End(xlUp).Row
’最終列を取得する(1行目を基準)
cnt=cells(1,Columns.Count).End(xlToLeft).Column
コメント