メインコンテンツへスキップ

Excelで印刷されたすべてのページの下部に行を繰り返し印刷するにはどうすればよいですか?

デフォルトでは、Excelはユーザーが行を上部に繰り返し印刷する機能を提供します。 ただし、場合によっては、ページの上部を除いて下部に行を繰り返し印刷することをお勧めします。 この記事では、ちょっとしたコツを紹介します。

VBAコードを使用して行の下部を繰り返し印刷します


VBAコードを使用して行の下部を繰り返し印刷します

以下のVBAコードを実行して、指定した行をすべてのページのフッターに挿入できます。 そして、Excelで印刷されたすべてのページの下部にこの行を繰り返し印刷できます。

1。 押す 他の + F11 キーを同時に開いて アプリケーション用 Microsoft Visual Basic 窓。

2。 の中に アプリケーション用 Microsoft Visual Basic ウィンドウダイアログボックスをクリックします インセット > モジュール。 次に、以下のVBAコードをコピーしてモジュールウィンドウに貼り付けます。

VBAコード:印刷されたすべてのページのフッターに指定された行を挿入します

Sub MyFooter()
	Dim xTxt As String
	Dim xAddress As String
	Dim xRg As Range
	Dim xCell As Range
	On Error Resume Next
	xAddress = ActiveWindow.RangeSelection.Address
	Set xRg  = Application.InputBox("Select the row you will insert repeatedly at the bottom:", "Kutools for Excel", xAddress, , , , , 8)
	If xRg Is Nothing Then Exit Sub
		For Each xCell In xRg
			xTxt = xTxt & xCell.Value & " "
		Next
		ActiveSheet.PageSetup.LeftFooter = xTxt
	End Sub

3。 プレス F5 コードを実行するためのキー。 次に、Kutools for Excelダイアログボックスが表示されます。印刷するすべてのページの下部で繰り返し印刷する必要がある行を選択して、[ OK

これで、指定した行の内容が、現在のワークシートのすべての印刷ページのフッターに追加されます。 ワークシートの印刷を開始できます。

Note:ブック全体の各ページの下部に選択したコンテンツを繰り返し印刷する場合は、フッター機能を適用して、すべてのシートのフッターにコンテンツを挿入できます。


Excelのn行ごとにタイトル行を簡単に繰り返す:

Kutools for Excel's タイトル行を挿入 以下のスクリーンショットに示すように、ユーティリティを使用すると、Excelで選択した範囲のn行ごとにタイトル行をすばやく挿入できます。
ダウンロードして今すぐ試してみてください! (30 日間の無料トレイル)

最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!
Comments (11)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi,

I've been trying to use the above code but when I try to print te code it doesn't work. I followed all above steps and it doesn't give me any errors.
I'm using office 365. Any tips ?

Thanks in advance,
This comment was minimized by the moderator on the site
Hi Tim,
Hi, the selected row will be inserted into the page footer, you need to switch to the Page Layout view to check for the result. Thank you for your comment.
This comment was minimized by the moderator on the site
Hi,

When I start the macro and select the wished rows it doesn't work when I try to print. What can this be?
Using office 365.

Thanks,
This comment was minimized by the moderator on the site
Hi,
I am trying a few times but it's not working. Please advise.
This comment was minimized by the moderator on the site
Good day,
Thank you for your comment. Which Office version do you use?
This comment was minimized by the moderator on the site
If I may, I use Office365 but its not working. Have tried putting the view on Page Layout Mode to no avail. Hope you can help. Thanks.
This comment was minimized by the moderator on the site
Thank you So Muchhhh...
It helped me very much.
This comment was minimized by the moderator on the site
Thanks for sharing. is any possibility of VBA code to repeated footer same as with "print titles" option including lines and auto page number. if possible please help me.
This comment was minimized by the moderator on the site
Thanks for sharing the macro to repeat the rows at the bottom of the page. Can this Macro be modified to Repeat selected Rows with the format as well.. In the provided Macro only Values are repeated at the bottom of each page, I am looking forward to copy the format as well at the bottom of the page..
This comment was minimized by the moderator on the site
Thanks a lot. This macro serves my purpose, Thanks to the creator and the person who had shared Macro
This comment was minimized by the moderator on the site
Thanks for Macro sharing. It serves my purpose. Thanks a lot.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations