View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Subtotal in header

Something like:

Sub Macro1()
ActiveSheet.PageSetup.CenterHeader = Range("C3").Value
End Sub

will put the value of any cell (here C3) in the header.

If you are producing a page-by-page report with a different header for each
page, then you would use a macvro that performs setup-and-print for each page.
--
Gary's Student


"Stefi" wrote:

Hi All,

I have a sheet subtotalled by column E with page breaks. I'd like to display
the value of column E on a particular page in the header of that page. How
can I do that?
E.g.
Page1 (requested value in header: AC06)
A B C D
E F
2006.05.22 5 98 24/2006 AC06 2 000
2006.05.22 5 98 26/2006 AC06 2 000
AC06 Subtotal 4 000
Page2 (requested value in header: BB08)
2006.05.18 5 96 0054187 BB08 44 800
2006.05.18 5 96 0054188 BB08 40 250
2006.05.19 5 97 0054195 BB08 42 840
BB08 Subtotal 127 890

Thanks,
Stefi