Excelで「表」を選択したい場合、ショートカットではCtrl+Shift+:(Windows)ですが、マクロでこれと同じ挙動をするプロパティとしてCurrentRegionが用意されています。
なお、「表」とは空白セル/先頭(末尾)列・行で分断された範囲のことを指します。
CurrentRegionプロパティの使い方
セルの所属する表を指定
対象.CurrentRegion
対象.CurrentRegion

やりたいこととしては、こうした表に対して、

全体を選択し、

E列に貼り付けをしてみます。

A1~C7の表をこの場合選択したいわけですが、表内のいずれかのセル、たとえばRange(“A1”).CurrentRegion.Selectとしてやれば、

A1セルの所属する表全体が選択されます。
Range(“C7”).CurrentRegionなど別のセルでもいいですし、表からはみ出なければ範囲指定でもOKです。表のサイズが変更になっても問題ないように、見出しのあるセルなどを指定するのが無難です。
Range(“C7”).CurrentRegionなど別のセルでもいいですし、表からはみ出なければ範囲指定でもOKです。表のサイズが変更になっても問題ないように、見出しのあるセルなどを指定するのが無難です。

あとは選択した表を貼り付けられればいいので、Range(“A1:A3”).CurrentRegion.Copy Range(“E1”)とでもしてやれば、

このように表をコピペすることができます。
コピーについてもう少しちゃんと知りたい方はこちらをご参照ください。

関数・演算子・メソッド・プロパティ名から探すExcel/VBA(マクロ)使い方・組み合わせ方まとめ
こちらはExcelやメソッドの諸機能を、機能の名称から探せるまとめ記事です。
コメント