2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

vbaでテーブルの最終行がうまく取得できない時の対処

Last updated at Posted at 2016-12-29

概要

データをテーブルに入力後、最終行を取得しようとするとなぜか以前入力して行を削除してた位置が取得されてしまう。この問題で2時間悩んだ。。

最終行の取得

MaxRow = Cells(Rows.Count, 1).End(xlUp).Row

行の取得がテーブルの場合やらなくてはいけないこと

テーブルツール > ツール > 範囲に変換

これをやらないと、一度入力して消した空白セルが取得されてしまう

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?