Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Set some Excel records as a fixed footer on the end of a page
Newsgroupers
I have a worksheet with 50 records. The last 5 records are on the final end of the page and were filled in as a footer for this page. Now I had hidden a few records divided over the records 1 till 45 because I didn't want to print the text that were registrated on it. When printing this page the 'footer-records' (record 46 till 50) stay somewhere in the middle (locical because I had hidden some records and everything then will roll up). My question is that I want my records 46 till 50 always on the end of my page. I want to set them as a kind of fixed footer independend of the number of hidden rows. Somebody know how to do this ? regards, Johan |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Set some Excel records as a fixed footer on the end of a page
this macro should do the trick.
it will count how many hidden rows you have got at the time insert rows just above row 45 do a print and delete the inserted rows you may need to adjust ranges depending on your layout Sub footer() Dim hiddencount As Integer Sheet1.Select hiddencount = 0 For i = 1 To 45 If Rows(i).Hidden Then hiddencount = hiddencount + 1 End If Next i Range("a45", Range("a45").Offset(hiddencount - 1, 0)).Select Selection.EntireRow.Insert ActiveWindow.SelectedSheets.PrintOut copies:=1 Selection.EntireRow.Delete Range("a1").Select End Sub -- Greetings from New Zealand "johan" wrote in message ups.com... Newsgroupers I have a worksheet with 50 records. The last 5 records are on the final end of the page and were filled in as a footer for this page. Now I had hidden a few records divided over the records 1 till 45 because I didn't want to print the text that were registrated on it. When printing this page the 'footer-records' (record 46 till 50) stay somewhere in the middle (locical because I had hidden some records and everything then will roll up). My question is that I want my records 46 till 50 always on the end of my page. I want to set them as a kind of fixed footer independend of the number of hidden rows. Somebody know how to do this ? regards, Johan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Format page number in excel footer to start at a specific page # | Excel Discussion (Misc queries) | |||
How do a set up a footer in Excel for page x of y? | Excel Discussion (Misc queries) | |||
Importing file with fixed width, multi-line records | Excel Discussion (Misc queries) | |||
save an excel file in fixed length records whose fields are blank | Excel Discussion (Misc queries) | |||
How do I export an excel file as fixed length records | Excel Discussion (Misc queries) |