Home

Subtotals criteria as print title

%3CLINGO-SUB%20id%3D%22lingo-sub-758673%22%20slang%3D%22en-US%22%3ESubtotals%20criteria%20as%20print%20title%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-758673%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20an%20Excelsheet%20file%20with%20subtotals.%3C%2FP%3E%3CP%3EI%20want%20to%20repeat%20the%20subtotal-criteria%20(each%20change%20in)%20as%20printtitle.%3C%2FP%3E%3CP%3EI%20have%20set%20%22Page%20breaks%20between%20groups%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20option%20%22rows%20to%20repeat%20at%20top%22%20in%20Page%20Setup%20is%20only%20working%20on%20the%20first%20printed%20page%20and%20repeat%20this%20on%20each%20folowing%20page.%20I%20want%20to%20print%20each%20changing%20field%20as%20printtile.%3C%2FP%3E%3CP%3EHow%20can%20I%20do%20that%3F%20Probably%20there%20is%20another%20function%20to%20do%20this.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-758673%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-765788%22%20slang%3D%22en-US%22%3ERe%3A%20Subtotals%20criteria%20as%20print%20title%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-765788%22%20slang%3D%22en-US%22%3E%3CP%3EOn%20another%20dutch%20forum%20I%20got%20next%20solution%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESub%20Direct_printen_bezorglijsten()%3CBR%20%2F%3EWith%20Sheets(%22LedenExport_32865_201907170935%22).Cells(1).CurrentRegion%3CBR%20%2F%3Ear%20%3D%20.Value%3CBR%20%2F%3ESet%20d%20%3D%20CreateObject(%22Scripting.Dictionary%22)%3CBR%20%2F%3EFor%20j%20%3D%202%20To%20UBound(ar)%3CBR%20%2F%3Ed(ar(j%2C%2010))%20%3D%20d(ar(j%2C%2010))%20%2B%201%3CBR%20%2F%3ENext%20j%3CBR%20%2F%3EFor%20Each%20it%20In%20d%3CBR%20%2F%3E.AutoFilter%2010%2C%20it%3CBR%20%2F%3E.Parent.PageSetup.LeftHeader%20%3D%20it%20%26amp%3B%20%22%20(%22%20%26amp%3B%20d(it)%20%26amp%3B%20%22%20adressen)%22%3CBR%20%2F%3E.Resize(%2C%208).PrintOut%20'.printout%3CBR%20%2F%3ENext%20it%3CBR%20%2F%3E.AutoFilter%3CBR%20%2F%3EEnd%20With%3CBR%20%2F%3EEnd%20Sub%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Henk_Edel
New Contributor

I have an Excelsheet file with subtotals.

I want to repeat the subtotal-criteria (each change in) as printtitle.

I have set "Page breaks between groups".

 

The option "rows to repeat at top" in Page Setup is only working on the first printed page and repeat this on each folowing page. I want to print each changing field as printtile.

How can I do that? Probably there is another function to do this.

 

 

 

1 Reply
Highlighted

On another dutch forum I got next solution:

 

Sub Direct_printen_bezorglijsten()
With Sheets("LedenExport_32865_201907170935").Cells(1).CurrentRegion
ar = .Value
Set d = CreateObject("Scripting.Dictionary")
For j = 2 To UBound(ar)
d(ar(j, 10)) = d(ar(j, 10)) + 1
Next j
For Each it In d
.AutoFilter 10, it
.Parent.PageSetup.LeftHeader = it & " (" & d(it) & " adressen)"
.Resize(, 8).PrintOut '.printout
Next it
.AutoFilter
End With
End Sub

 

 

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies