How can I use a calculation in a footer? (eg (=10+1)!!)

G

Guest

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!
 
G

Guest

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
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top