Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 303
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format page number in excel footer to start at a specific page # straitctrydncr Excel Discussion (Misc queries) 4 April 28th 23 07:45 PM
How do a set up a footer in Excel for page x of y? Elle Web Excel Discussion (Misc queries) 1 July 12th 06 04:11 AM
Importing file with fixed width, multi-line records danmcgov Excel Discussion (Misc queries) 7 March 20th 06 08:05 PM
save an excel file in fixed length records whose fields are blank ascii save Excel Discussion (Misc queries) 1 October 13th 05 06:01 PM
How do I export an excel file as fixed length records iainjh Excel Discussion (Misc queries) 2 March 3rd 05 05:59 PM


All times are GMT +1. The time now is 06:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"