Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
mae1778
 
Posts: n/a
Default Page Number inside Cell?


That is, I'm not looking for the head/footer solution. Is there a way
to post page numbers in the worksheet instead of using the head/footer
command?


--
mae1778
------------------------------------------------------------------------
mae1778's Profile: http://www.excelforum.com/member.php...o&userid=25716
View this thread: http://www.excelforum.com/showthread...hreadid=395379

  #2   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

mae,

Putting page numbers into cells could be done with a macro. If there aren't
a lot of pages, you may find it acceptable to put them in manually with
View - Page break preview, where you can see the page breaks (dashed lines).
--
Earl Kiosterud
www.smokeylake.com

"mae1778" wrote in
message ...

That is, I'm not looking for the head/footer solution. Is there a way
to post page numbers in the worksheet instead of using the head/footer
command?


--
mae1778
------------------------------------------------------------------------
mae1778's Profile:
http://www.excelforum.com/member.php...o&userid=25716
View this thread: http://www.excelforum.com/showthread...hreadid=395379



  #3   Report Post  
Member
 
Location: London
Posts: 78
Default

Quote:
Originally Posted by Earl Kiosterud
mae,

Putting page numbers into cells could be done with a macro. If there aren't
a lot of pages, you may find it acceptable to put them in manually with
View - Page break preview, where you can see the page breaks (dashed lines).
--
Earl Kiosterud
www.smokeylake.com

"mae1778" wrote in
message ...

That is, I'm not looking for the head/footer solution. Is there a way
to post page numbers in the worksheet instead of using the head/footer
command?


--
mae1778
------------------------------------------------------------------------
mae1778's Profile:
http://www.excelforum.com/member.php...o&userid=25716
View this thread: http://www.excelforum.com/showthread...hreadid=395379

Doing what you want to do is not going to be easy OR reliable and I don't think is really worth it - page numbers are calculated dynamically by the printer driver whenever the sheet is previewed or printed.

Indeed, the page numbers you actually get when PRINTING can even be different to what you see in the Preview (we have an HP Business Inkjet where the preview and Page Break Preview will state 'Page 1 of 1' but when printed spills out onto a Page 2).

Even if you did have a macro to work out the current pagination and put them in cells, if the printer driver changed these after it being sent to print, those cell 'page numbers' would not change to suit.

I should know, I've had at least half-a-dozen cracks at this working at different companies and as an answer to different briefs, and it has never come off, for both that reason and also that cells are best kept for the data itself rather than formatting items.

One think you might like to consider is creating a totally separate worksheet, entitled "Output", which could have a set area for data to show in - i.e. you have a 'header' in Row 1, a 'footer' (complete with page number, defined in a named range as PAGE_NUM) in a Row near the bottom of the page, and in between have a bunch of cells (let's assume 20 rows deep) which contain the following formula pasted down (to allow the relative reference of A1 to move with the cells):

=OFFSET(Sheet1!A1,PAGE_NUM*20,0)

What this would do is display the first 20 rows of data in your sheet when the PAGE_NUM cell contains the value '1'. You could then type '2' into the PAGE_NUM cell and the data from rows 21-40 would then appear instead.

You could even add a spinner control linked to the PAGE_NUM cell so that you could 'flick' through your 'pages' and print only the ones you wanted - then you'd have ultimate control.

(All this, of course, is assuming that your output sheet snugly fits onto 1 page itself.)

Regards,
BizMark
  #4   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Biz,

I'm not surprised at your comments. Printing has always been an inexact
science. Minor size variations can put a row, line, whatever into the next
page. I've always hoped that as long as you're using the same print driver
when you do the page numbers, the pagination will be identical when it
actually prints. But your experience reveals that it ain't necessarily so.
Thanks.
--
Earl Kiosterud

"BizMark" wrote in message
...

Earl Kiosterud Wrote:
mae,

Putting page numbers into cells could be done with a macro. If there
aren't
a lot of pages, you may find it acceptable to put them in manually
with
View - Page break preview, where you can see the page breaks (dashed
lines).
--
Earl Kiosterud
www.smokeylake.com

"mae1778" wrote
in
message ...-

That is, I'm not looking for the head/footer solution. Is there a
way
to post page numbers in the worksheet instead of using the
head/footer
command?


--
mae1778

------------------------------------------------------------------------
mae1778's Profile:
http://www.excelforum.com/member.php...o&userid=25716
View this thread:
http://www.excelforum.com/showthread...hreadid=395379
-



Doing what you want to do is not going to be easy OR reliable and I
don't think is really worth it - page numbers are calculated
dynamically by the printer driver whenever the sheet is previewed or
printed.

Indeed, the page numbers you actually get when PRINTING can even be
different to what you see in the Preview (we have an HP Business Inkjet
where the preview and Page Break Preview will state 'Page 1 of 1' but
when printed spills out onto a Page 2).

Even if you did have a macro to work out the current pagination and put
them in cells, if the printer driver changed these after it being sent
to print, those cell 'page numbers' would not change to suit.

I should know, I've had at least half-a-dozen cracks at this working at
different companies and as an answer to different briefs, and it has
never come off, for both that reason and also that cells are best kept
for the data itself rather than formatting items.

One think you might like to consider is creating a totally separate
worksheet, entitled "Output", which could have a set area for data to
show in - i.e. you have a 'header' in Row 1, a 'footer' (complete with
page number, defined in a named range as PAGE_NUM) in a Row near the
bottom of the page, and in between have a bunch of cells (let's assume
20 rows deep) which contain the following formula pasted down (to allow
the relative reference of A1 to move with the cells):

=OFFSET(Sheet1!A1,PAGE_NUM*20,0)

What this would do is display the first 20 rows of data in your sheet
when the PAGE_NUM cell contains the value '1'. You could then type '2'
into the PAGE_NUM cell and the data from rows 21-40 would then appear
instead.

You could even add a spinner control linked to the PAGE_NUM cell so
that you could 'flick' through your 'pages' and print only the ones you
wanted - then you'd have ultimate control.

(All this, of course, is assuming that your output sheet snugly fits
onto 1 page itself.)

Regards,
BizMark


--
BizMark



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
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
Maximum Number of Cell Formats Jim Allen Excel Discussion (Misc queries) 4 April 19th 05 07:07 PM
16 digit number wont keep alteration unless format cell to text Croc001 Excel Discussion (Misc queries) 3 March 30th 05 09:12 AM
number of character occurences in a cell Ron Excel Discussion (Misc queries) 1 March 21st 05 04:55 PM
Excel should let me circle a cell or number in the spreadsheet fo. BTaylor Excel Discussion (Misc queries) 2 March 8th 05 03:00 PM


All times are GMT +1. The time now is 01:08 AM.

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

About Us

"It's about Microsoft Excel"