Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
(sorry for my poor english) :-)) I copy a lot of tables in one to resume (it works) ; all areas have the same structure (from column A to K) but not the same numbers of rows; the grand total varies from 200 to 500 lines; i would like, after the copy, to place page break all the 66 lines (with a font 10, A4 paper) but if the ligne 66-132 etc.. is not free, the page break must be placed in a free line..before like 65-64-63. Thank you Patrick |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Something like this pseudo code. You might have to play with it a little to
get the pagebreaks exactly where you want them. Lastrow = cells(rows.count,1).End(xlup).row i = 66 do j = i + 1 do j = j -1 if Application.CountA(rows(j)) = 0 then _ Activesheet.HPageBreaks.Add Befo=rows(j + 1) Loop while Application.CountA(rows(j)) < 0 i = j + 66 Loop while i < LastRow -- Regards, Tom Ogilvy "...Patrick" wrote: Hello, (sorry for my poor english) :-)) I copy a lot of tables in one to resume (it works) ; all areas have the same structure (from column A to K) but not the same numbers of rows; the grand total varies from 200 to 500 lines; i would like, after the copy, to place page break all the 66 lines (with a font 10, A4 paper) but if the ligne 66-132 etc.. is not free, the page break must be placed in a free line..before like 65-64-63. Thank you Patrick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I remove dotted page break lines from my workbook pages? | Excel Discussion (Misc queries) | |||
Excel 2K- Is Page break view limited to 16 pages? | Excel Discussion (Misc queries) | |||
Break cell into multiple lines by line break | Excel Discussion (Misc queries) | |||
Line Break | Excel Discussion (Misc queries) | |||
How do you format a row to break accross pages in Excel? | Excel Worksheet Functions |