Przejdź do głównej zawartości

Jak utworzyć dynamiczny obszar drukowania w programie Excel?

Zwykle obszar drukowania jest stały po ustawieniu w arkuszu. W niektórych przypadkach chcesz, aby obszar drukowania dostosował się do zawartości wydruku, którą usunąłeś lub dodałeś w dowolnym momencie. Jak to osiągnąć? W tym artykule pokażemy Ci metodę tworzenia dynamicznego obszaru drukowania w programie Excel.

Tworzenie dynamicznego obszaru drukowania w programie Excel


strzałka niebieski prawy bąbelek Tworzenie dynamicznego obszaru drukowania w programie Excel

Jak pokazano na poniższym zrzucie ekranu, zakładając, że twój normalny obszar drukowania to A1: E5, ale dane zakresu mogą rosnąć do wiersza 10 i kolumny G. Możesz utworzyć dynamiczny obszar drukowania, wykonując następujące czynności.

1. Najpierw musisz utworzyć dynamiczny nazwany zakres. Kliknij Wzory > Menedżer nazw. Zobacz zrzut ekranu:

2. w Menedżer nazw okno dialogowe, kliknij przycisk Nowości , aby otworzyć Nowe imie Okno dialogowe. W oknie dialogowym Nowa nazwa wprowadź Formuła_obszaru_druku do Imię i wprowadź formułę =OFFSET($A$1,0,0,COUNTA($A$1:$A$10),COUNTA($A$1:$G$1)) do Odnosi się do i na koniec kliknij OK przycisk. Zobacz zrzut ekranu:

Note: we wzorze, 10 $ A $ XNUMX i G $ 1 oznacza, że ​​obszar wydruku nie będzie większy niż wiersz 10 i kolumna G. Możesz je zmienić według potrzeb.

3. Kiedy wraca do Menedżer nazw okno dialogowe, zamknij je.

4. Wybierz zakres z danymi, które ustawisz jako obszar wydruku (w tym przypadku wybieramy A1: E5), następnie kliknij Układ strony > Obszar wydruku > Ustaw obszar drukowania. Zobacz zrzut ekranu:

5. kliknij Wzory > Menedżer nazw otworzyć Menedżer nazw okno dialogowe.

6. w Menedżer nazw w oknie dialogowym wybierz opcję Obszar wydruku Imię a następnie zamień oryginalną formułę na = Formuła_obszaru_druku (nazwa zakresu dynamicznego utworzonego powyżej) w pliku Odnosi się do a następnie kliknij aby zapisać zmianę. Na koniec zamknij Menedżer nazw okno dialogowe.

Teraz tworzony jest dynamiczny obszar drukowania. Możesz zobaczyć, że obszar drukowania dostosowuje się z dodanymi lub usuniętymi danymi, dopóki nie osiągnie określonego wiersza i kolumny. Zobacz zrzut ekranu:

Najlepsze narzędzia biurowe

🤖 Pomocnik AI Kutools: Zrewolucjonizuj analizę danych w oparciu o: Inteligentne wykonanie   |  Wygeneruj kod  |  Twórz niestandardowe formuły  |  Analizuj dane i generuj wykresy  |  Wywołaj funkcje Kutools...
Popularne funkcje: Znajdź, wyróżnij lub zidentyfikuj duplikaty   |  Usuń puste wiersze   |  Łącz kolumny lub komórki bez utraty danych   |   Okrągły bez wzoru ...
Super wyszukiwanie: Wiele kryteriów VLookup    Wiele wartości VLookup  |   Przeglądanie pionowe na wielu arkuszach   |   Wyszukiwanie rozmyte ....
Zaawansowana lista rozwijana: Szybko twórz listę rozwijaną   |  Zależna lista rozwijana   |  Lista rozwijana wielokrotnego wyboru ....
Menedżer kolumn: Dodaj określoną liczbę kolumn  |  Przesuń kolumny  |  Przełącz stan widoczności ukrytych kolumn  |  Porównaj zakresy i kolumny ...
Polecane funkcje: Fokus siatki   |  Widok projektu   |   Duży pasek formuły    Menedżer skoroszytów i arkuszy   |  Biblioteka zasobów (Automatyczny tekst)   |  Selektor dat   |  Połącz arkusze   |  Szyfruj/odszyfruj komórki    Wysyłaj e-maile według listy   |  Super filtr   |   Specjalny filtr (filtruj pogrubienie/kursywa/przekreślenie...) ...
15 najlepszych zestawów narzędzi12 Tekst Tools (Dodaj tekst, Usuń znaki, ...)   |   50 + Wykres rodzaje (Wykres Gantta, ...)   |   40+ Praktyczne Wzory (Oblicz wiek na podstawie urodzin, ...)   |   19 Wprowadzenie Tools (Wstaw kod QR, Wstaw obraz ze ścieżki, ...)   |   12 Konwersja Tools (Liczby na słowa, Przeliczanie walut, ...)   |   7 Połącz i podziel Tools (Zaawansowane wiersze łączenia, Podział komórki, ...)   |   ... i więcej

Zwiększ swoje umiejętności Excela dzięki Kutools for Excel i doświadcz wydajności jak nigdy dotąd. Kutools dla programu Excel oferuje ponad 300 zaawansowanych funkcji zwiększających produktywność i oszczędzających czas.  Kliknij tutaj, aby uzyskać funkcję, której najbardziej potrzebujesz...

Opis


Karta Office wprowadza interfejs z zakładkami do pakietu Office i znacznie ułatwia pracę

  • Włącz edycję i czytanie na kartach w programach Word, Excel, PowerPoint, Publisher, Access, Visio i Project.
  • Otwieraj i twórz wiele dokumentów w nowych kartach tego samego okna, a nie w nowych oknach.
  • Zwiększa produktywność o 50% i redukuje setki kliknięć myszką każdego dnia!
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