LoginSignup
1
0

More than 5 years have passed since last update.

Excel / VBA > [3から5]行目に空行を挿入する > Rows("3:5").EntireRow.Insert

Last updated at Posted at 2017-03-27
動作環境
Windows 8.1 Pro (64bit)
Excel 2013

24行ずつある意味を持つ数値、からなるデータシートからグラフを作ろうとしている。

24行ずつ分けるには空行を入れて分離するのがいいだろうか。

EXCEL/VBA(VBは19年ぶりくらい)で実装できるか。

参考 http://analysistabs.com/excel-vba/insert-rows-worksheet/

に記載の「Instructions:」に従いエディタを開いて、以下を入力すればよさそう。
(Alt+F11)
([挿入]-[標準モジュール])

Sub sbInsertingRows()
Rows("3:5").EntireRow.Insert
End Sub

F5で実行した。

空行を3行挿入できた。

ただし、Undo処理はできない。
(やり方は未調査)。

bashで前処理した方が楽かもしれない。

1
0
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
1
0