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

Excelで動的な印刷領域を作成するにはどうすればよいですか?

通常、ワークシートに設定した後、印刷領域は一定です。 場合によっては、削除または追加した印刷コンテンツに合わせて印刷領域を調整したいことがあります。 それを達成する方法は? この記事では、Excelで動的な印刷領域を作成する方法を紹介します。

Excelで動的印刷領域を作成する


矢印青い右バブル Excelで動的印刷領域を作成する

以下のスクリーンショットに示すように、通常の印刷領域がA1:E5であると仮定しますが、範囲データは行10と列Gまで大きくなる可能性があります。次の手順で動的印刷領域を作成できます。

1.最初に動的な名前付き範囲を作成する必要があります。 クリック > 名前管理者。 スクリーンショットを参照してください:

2。 の中に 名前管理者 ダイアログボックスで 新作 ボタンを押して 新しい名前 ダイアログボックス。 そして、[新しい名前]ダイアログボックスに、 印刷エリア数式名前 ボックスに入力し、数式を入力します =OFFSET($A$1,0,0,COUNTA($A$1:$A$10),COUNTA($A$1:$G$1))を参照する ボックスをクリックし、最後に OK ボタン。 スクリーンショットを参照してください:

Note:式では、 $ A $ 10 & $ G $ 1 つまり、印刷領域は行10と列Gより大きくなることはありません。必要に応じて変更できます。

3.に戻ったとき 名前管理者 ダイアログボックスを閉じてください。

4.印刷領域として設定するデータの範囲を選択します(この場合、 A1:E5)、次にクリックします ページレイアウト > 印刷領域 > 印刷領域を設定する。 スクリーンショットを参照してください:

5。 クリック > 名前管理者 を開く 名前管理者 ダイアログボックス。

6。 の中に 名前管理者 ダイアログボックスで 印刷領域 セクションに 名前 ボックスをクリックし、元の数式を次のように置き換えます = 印刷エリア_式 (上記で作成したダイナミックレンジの名前) を参照する ボックスをクリックし、 ボタンをクリックして変更を保存します。 最後に閉じます 名前管理者 ダイアログボックス。

これで、動的印刷領域が作成されました。 指定した行と列に到達するまで、追加または削除したデータで印刷領域が調整されていることがわかります。 スクリーンショットを参照してください:

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

🤖 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 (10)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
Plain and simple, I've tried it a dozen times, made adjustments and still doesn't work. It won't take the formula. It keeps reverting, which means its reading the formula as an error. Don't get it. The name of my sheet is Contract Invoice. I don't see where you put that in the formula. I've tried replacine the COUNTA with the name of the sheet, tried putting it before and after COUNTA, but still nothing. My email is obviously listed above. If anyone has any suggestions, I'll try them.
This comment was minimized by the moderator on the site
Hi John,
If you wanted a print area for all non-blank rows, you might have something like
=OFFSET('Contract Invoice'!$A$1:$S$1,0,0,MAX(IF('Contract Invoice'!$A$1:$A$1005<>"",ROW('Contract Invoice'!$A$1:$A$1005),0)))

or whatever you like. The sheet name in the formula shouldn't matter.

You'd then define this name (say =my_print_area) as above mentioned above and set the "scope" to the workbook.

Then define your Print_Area to link to this formula and set the Scope to "Contract Invoice".

Hope that helps.
This comment was minimized by the moderator on the site
This was the best solution to this problem I found, after hours of searching
Rated 5 out of 5
This comment was minimized by the moderator on the site
this is definitely super usefull. However, each time I close and reopen the file, the Print_Area name configuration is gone. So each time I have to go to Define Names, and say Print_Area = Print_Area_Formula. Someone else with the same issue?? Thx!
This comment was minimized by the moderator on the site
Yeah, this is the only problem, but it only seems to happen when you open the Page Layout settings. Otherwise, it seems to be fine.
This comment was minimized by the moderator on the site
Ca ne fonctionne pas. A chaque fois qu'on faire le gestionnaire de noms et qu'on rentre dedans, il a remplacé la formule par la zone area de départ
This comment was minimized by the moderator on the site
Hi, just one thing, is your formula dynamic?. Would this be better =OFFSET($A$1,0,0,COUNTA($A:$A),COUNTA($1:$1))?

Then when the pivot changes or cells or columns are added the formula does not need to change.
This comment was minimized by the moderator on the site
First of all, thanks a lot!


Secondly: you don't need to define two "names" in the Mame Manager. As a simpler alternative, just select some random cells and set the print area (on those random cells), then open the Name Manager: it will have the print_area already in: here you can replace the content with the formula you want.
This comment was minimized by the moderator on the site
hi
thank you, it is great.

is there any way to have a conditional reference for the offset? I mean use the offset from the first cell in column A that contains a letter A, or equal to number 3 or filled by the color yellow.

I tried the following formula but it doesn't work.

offset(indirect(CELL("address",INDEX(A:A,MATCH("A",A:A,0)))),0,1,COUNTA(Sheet1!$b+Sheet1!$b:$b),7)

thanks

Mike
This comment was minimized by the moderator on the site
Hello,Its useful &exciting.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations