Page Number inside Cell?

M

mae1778

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

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).
 
B

BizMark

Earl said:
mae,

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

"mae1778" [email protected] wrot
in
message
That is, I'm not looking for the head/footer solution. Is there
way
to post page numbers in the worksheet instead of using th
head/footer
command?


--
mae1778

------------------------------------------------------------------------
mae1778's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=25716
View this thread
http://www.excelforum.com/showthread.php?threadid=395379
-


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

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

Even if you did have a macro to work out the current pagination and pu
them in cells, if the printer driver changed these after it being sen
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 a
different companies and as an answer to different briefs, and it ha
never come off, for both that reason and also that cells are best kep
for the data itself rather than formatting items.

One think you might like to consider is creating a totally separat
worksheet, entitled "Output", which could have a set area for data t
show in - i.e. you have a 'header' in Row 1, a 'footer' (complete wit
page number, defined in a named range as PAGE_NUM) in a Row near th
bottom of the page, and in between have a bunch of cells (let's assum
20 rows deep) which contain the following formula pasted down (to allo
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 shee
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 appea
instead.

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

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

Regards,
BizMar
 
E

Earl Kiosterud

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.
 
Top