A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Display result of formula in header?



 
 
Thread Tools Display Modes
  #1  
Old March 24th 06, 06:32 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default Display result of formula in header?

I want my header to say "yyyy results", where yyyy is the current year.

Any suggestions?
Ads
  #2  
Old March 24th 06, 07:01 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default Display result of formula in header?

With the current year entered in A1,

Sub CellValueInHeader()
With ActiveSheet.PageSetup
.LeftHeader = Range("a1").Value & " Results"
End With
End Sub

Vaya con Dios,
Chuck, CABGx3



"Hubitron2000" wrote:

> I want my header to say "yyyy results", where yyyy is the current year.
>
> Any suggestions?

  #3  
Old March 24th 06, 07:25 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default Display result of formula in header?

Here is a Workbook subroutine - in VBA Editor Project click ThisWorkbook;
and copy Sub there.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim dte As Date
dte = Date
With ActiveSheet.PageSetup
.LeftHeader = Format(dte, "yyyy") & " Results"
End With
End Sub

Found in Google Newsgroup search; acknowledgement to Bob Philips in
microsoft.public.excel.misc Fri, Nov 4 2005 1:01 pm

best wishes

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Hubitron2000" > wrote in message
...
>I want my header to say "yyyy results", where yyyy is the current year.
>
> Any suggestions?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Currency to Text mytipi Excel Worksheet Functions 1 February 21st 06 11:43 PM
How do I display the RESULT of a formula Poor microsoft user New Users to Excel 3 April 27th 05 03:18 PM
Amount or Numbers in Words ron New Users to Excel 6 December 24th 04 07:32 PM
Spellnumber Norman Jones Excel Worksheet Functions 6 December 13th 04 07:21 AM
Excel 2003 - Formula result shows as 0:00 Serena Excel Worksheet Functions 4 November 11th 04 10:18 PM


All times are GMT +1. The time now is 11:41 PM.


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