ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How can I use a calculation in a footer? (eg (=10+1)!!) (https://www.excelbanter.com/excel-discussion-misc-queries/101858-how-can-i-use-calculation-footer-eg-%3D10-1-a.html)

John Mc Twang

How can I use a calculation in a footer? (eg (=10+1)!!)
 
I need to use a calculation in a footer as an "additonal" page reference (the
sheet forms part of another document). I cannot reset the page number as I
need to use standard numbering in the document too. In full I need the
following in a footer:

Page x of y (standard option)
Page (x+10) of (y+10) of document H1234

Hope this makes sense!

paul

How can I use a calculation in a footer? (eg (=10+1)!!)
 
a macro could do that.You would have to do the calculation eithr on the shet
or within the macro then paste it into the text part of the footer.I dont
know the code but if you record a macro whie you edit the footer you will get
an idea
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 28/07/2006 by ............
'
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = "a custom footer" & Chr(10) & "&P&N&Z&F&F"
.RightFooter = ""
End With
end Sub
the idea of pasting a worksheet formula result didnt work,but maybe a vba
variable might
Hope this is of some help

--
paul

remove nospam for email addy!



"John Mc Twang" wrote:

I need to use a calculation in a footer as an "additonal" page reference (the
sheet forms part of another document). I cannot reset the page number as I
need to use standard numbering in the document too. In full I need the
following in a footer:

Page x of y (standard option)
Page (x+10) of (y+10) of document H1234

Hope this makes sense!


paul

How can I use a calculation in a footer? (eg (=10+1)!!)
 
this worked
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 28/07/2006 by Shepherd
'

myfooter = 8
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = myfooter
.RightFooter = ""

End With

End Sub
ie the footer was 8
--
paul

remove nospam for email addy!



"John Mc Twang" wrote:

I need to use a calculation in a footer as an "additonal" page reference (the
sheet forms part of another document). I cannot reset the page number as I
need to use standard numbering in the document too. In full I need the
following in a footer:

Page x of y (standard option)
Page (x+10) of (y+10) of document H1234

Hope this makes sense!



All times are GMT +1. The time now is 09:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com