view cell content in header

Hi folks
Can I customise the header so the left section = the content of a cell
in the sheet eg A1.
All I seem to be able to do is add date, page etc etc..
thanks
john
Images of home (NZ)
http://www.titahi-bay.co.nz/home
What we are up to in the UK
http://www.titahi-bay.co.nz
0
j5440 (4)
12/30/2005 1:53:19 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
363 Views

Similar Articles

[PageSpeed] 0

You need some VBA code to do this:

You can use the workbook_beforeprint event to modify the header.

Option Explicit
Private Sub Workbook_BeforePrint(Cancel As Boolean)
    With Me.Worksheets("sheet1")
        .PageSetup.LeftHeader = .Range("a1").Text
    End With
End Sub

This goes behind the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

John in Surrey wrote:
> 
> Hi folks
> Can I customise the header so the left section = the content of a cell
> in the sheet eg A1.
> All I seem to be able to do is add date, page etc etc..
> thanks
> john
> Images of home (NZ)
> http://www.titahi-bay.co.nz/home
> What we are up to in the UK
> http://www.titahi-bay.co.nz

-- 

Dave Peterson
0
petersod (12005)
12/30/2005 3:03:13 PM
Reply:

Similar Artilces:

Find feature does not work with HTML messages (Content-type: text/html)
I have Outlook 2000 SP-3 running under Windows ME. When using the Find feature to locate all e-mails with a given word in the message, no items are found if the e-mails are of "text/html" content-type. The Find feature appears to work for any messages that have URLs embedded and are "multipart/alternative" or "text/plain" content-type. I noticed a similar post several months ago (see http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=%23qSBYIssDHA.2224%40TK2MSFTNGP09.phx.gbl). Is there a work-around for this problem, or should this be reported t...

Outlook viewing attachments
When I receive an email that has embeded pics, I can see the pics and text together as they should be, when going directly to att.net. Also, same on iphone. On Outlook, however, the pics show up as attachments and each must be opened separately. I am sure there is a setting to make them show in the main body of the message. Can you help me? "kenh" <kenh@discussions.microsoft.com> wrote in message news:3C81693E-C419-4B81-A398-F34C78E36DF4@microsoft.com... > When I receive an email that has embeded pics, I can see the pics and text > together as they sho...

Collapsed list view report control
I'm try to set up an EXCEL like window, which apparently one can do with a REPORT control. I actually get it work, but all the columns are scrunched to the left when the window comes up, forcing the user to move the partions. I'm using Visual C++ 7.0. Here' the code. Thanks, Ihor P.S. Is there an easier way of inserting a line of data?? ----------------------------------------------------------------------- CRect rect(16 ,60,450 ,250); m_pendlistctrl.Create(WS_VISIBLE|WS_CHILD|LVS_REPORT,rect, this,IDD_WIRE_DIALOG); //m_pendlistctrl is a CListCtrl m_...

too many different formatting cells
I can't open an excel document because whem I try to open it says that too many different formatting cells. How to resolve this and open this document? Maybe... XL: Error Message: Too Many Different Cell Formats http://support.microsoft.com/default.aspx?scid=213904 A few people have said that OpenOffice.Org has been able to open the file. Then they clean it up and save it there. Then excel can open that cleaned up version. http://www.openoffice.org, a 60-104 meg download or a CD jo wrote: > > I can't open an excel document because whem I try to open it says that too >...

Use cell value as cell address
Hello everyone. I have a worksheet "Main" of 39,000 rows in which column B contains a number between 1 and 7,500. Column C is an empty column I have added. The second sheet, "Names" in the book contains a single column - A - of 7,500 names. I want to get the value from the second sheet that matches the number column of the first sheet. In other words, if "Main" cell B3 contains 3780, I want to put the value from "Names" cell A3780 into "Main" C3. How do I do this please? Richard --- Message posted from http://www.ExcelForum.com/ Hi tr...

Header & Footer #2
I often get files from other users who do not maintain the headers footers properly. Is it possible that we adjust the Header and/or Footer for on worksheet and the Header and/or Footer is automaticcaly updated for al other worksheets in the same file. It would save a lot of time, sinc otherwise you have to go to all the worksheets and make the change manually. Thanks in advance. PS: Using Excel 200 -- Message posted from http://www.ExcelForum.com Hi Group the sheets first(right click on a sheet tab and choose"Select all sheets") Change the header in File Page Setup Ungroup t...

Formulas showing in cell???
I keep getting a formula showing in the cell after I edit i (occasionally). Show formulas is turned off and edit in cell is on. How can I make the formula go awaw and simply show the results whic when edited the results shows correctly? -- Message posted from http://www.ExcelForum.com Hi probably the cell is formated as 'Text' change the cell format to 'General' and re-enter your formula -- Regards Frank Kabel Frankfurt, Germany > I keep getting a formula showing in the cell after I edit it > (occasionally). Show formulas is turned off and edit in cell is on. >...

How the heck do I find tables, views, forms etc... in Access 2007
Can Access 2007 navigation be any more convoluted? I've been spending close to an hour trying to find a single table, query form, etc... now that the navigation has been changed. Is there a way to get the old style back? It does take some time - more than an hour :-) - to become familiar with the new interface in A2007 (NavPane, ribbon, ...) Suggestions: - The title bar at the top of the Nav Pane includes a tick box for: All Access Objects - Set Category to: Object Type - The categories (Tables, Queries, ...) collapse. - Show and use the Search Bar. It filters objects as...

How to get total "conditional sum of cells" in a column?
Hi all, I have dollar amounts in one col, and status in another. I want the sum of those dollar amounts where the corresponding status cell is empty (blank). How do I do this? Thanks for any hints, cdj Status in Column A and dollar amounts in Column B: =SUMPRODUCT((A2:A100="")*B2:B100) -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings sandymann2@mailinator.com Replace @mailinator.com with @tiscali.co.uk "sherifffruitfly" <sherifffruitfly@gmail.com> wrote in message news:bc08584b-1338-4b3f-8ab3-cc3e1602e581@n1g2000prb.go...

How to only "paste values" of cells that are not "hidden"?
Hello, In my document, many columns are hidden. Say column B is hidden, and I need to copy columns A and C and paste values into another Excel document. How can I do that? When I select columns A and C, copy and paste values, the other document contains columns A,B and C, instead of just columns A and C. Thank you! Don't drag-select, control-click A and then C, for scattered-selection. Danny On Sun, 17 Jul 2005 16:33:01 -0700, Sam <Sam@discussions.microsoft.com> wrote: > Hello, > > In my document, many columns are hidden. Say column B is hidden, &g...

pasting or moving formula cells without updating formulas
I have a flat spreadsheet with a results page at the end. The results page contains a set of formulae which refer to various cell locations within the body of the spreadsheet in order to return statistical results based on the values in said cells. Now I'd like to add more data to my spreadsheet, so i need to make it bigger; however, when I copy and paste, or select and drag the cells containing the formulae, Excel updates the formulae so that they refer to different cells which bear the same spatial relationship to the formulae as the original referees did before the formulae were ...

how do i copy a formula when cell references r not together
in cell reference H5 i have a formula H4*H3, I have copied this formula through to DG5. In cell reference H7 I have a formula H6*H3 which i have also copied through to DG7.I have formulas right down to cell reference H299 (H298*H3) Is there a quick way to repeat the copy bearing in mind the cell references are not together ie H5, H7, H9 and so on. Jon, Copy cells H6:H7, then select H6:H299 and pastespecial formulas. Just make sure your formula is =H6*$H$3 HTH, Bernie MS Excel MVP "jon104" <jon104@discussions.microsoft.com> wrote in message news:DDAB488A-5CDA-47A2-AD...

Scrolling through cells
I'm having trouble scrolling through the cells using the arrows. When I was typing in a cell I used to be able to press one of the arrow keys and it would automatically go to the next cell. Now when I press the arrow key is sticks the next cell in as part of a formula. I'm not sure what's happened to change this. Can anyone help???? thanks :) You are probably in Extend mode. This happens when you press F8. It shows "EXT" in the Status bar (to the right) Press F8 again to deactivate this. -- Kind regards, Niek Otten Microsoft MVP - Excel "alice" &l...

How do I use text in a cell as a range name in a formula
If cell A1 had the text TEST in it and TEST is the name I have given to a group of cells using the name box what formula can I use to give me the sum of TEST, thats is the sum of the cells in the group called TEST. I understand that I can simply have =SUM(TEST), but I want the formula to refer to Cell A1 to get the name ie =SUM(A1) doesn't work obviously Any help appreciated Thank you In this case, you want to use the INDIRECT function. E.g., =SUM(INDIRECT(A1)) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Kiwi" &...

Overwriting a cell with a formula without deleting the formula
Hello. I am creating an Expense Report worksheet and have created a simple formula that will calculate mileage based on total miles. Below is my worksheet data. A B C D 1 Expense Type Acct. Code Total Miles Amount 2 Airfare 11111 $250.00 3 Mileage 22222 20 $10.00 I am trying to figure out a way to create a conditional formula so that IF Expense...

Highlight changes within cell
Good morning! Using Excel 2003 I need to highlight the changes I’m making within a cell. For example: In cell B2, is the customer’s original order quantity of 200. I revise it to show 225 and I’d like the cell to be highlighted in yellow. I can then copy and paste the info into an email to show the customer which items have been revised. I’ve tried using Track Changes, but it seems that I have to click on the Track Changes button each time I open the workbook. It also doesn’t keep the revision highlighted for a copy and paste. I have 20+ worksheets within the workbook an...

deleting duplicate cells
I am back again... Thanks to everyone's help here last time, I was able to finish all my work and do it correctly. Ken- I asked last time i was here about deleting duplicate cells. Some of the names(address, etc) are repeated in my sheet. I want to delete the extra cell of the people who are in here twice. Not jus the cell but their record, name, address, city, state zip when they are in their twice so that they will only be listed once. You told me how to do this once but i cant find where it is on the board. Thanks for all the help.... BR4 -----------------------------------------...

Bug? Multiple values in merged cells
I found that merged cells can contain multiple values. Steps to reproduce: Type 1,2,3,4 in a1:d1 type sum(a1:d1) in e1 Select a1:b1 and merge Warning : MultipleData, overwrite? Say yes to merge Select the merged a1:b1 cells Copy Select c1 PasteSpecial Formats No warning.. no overwrite. c1:d1 are now merged BUT d1 still contains a value... and the SUM of a1:d1 = 8 !! Also happens with FormatPainter etc Behaviour observed in xl97,xlXP and xl2003 Error checking will find no fault in the sheet... and you can spend ages to find out WHY your cross sums dont match! (although now that i fou...

Find Blank Cells
I wish to replace the blank cells in a large database with a zero (0). I cannot figure out how to find a blank cell using the Find and Replace option under the Edit menu. Can anyone show me the way? Hi Peter, I always use CTRL+H to bring up the find and replace menu, leave the fine part empty, and put in what you want to replace it with....however, I do notice you say in a "database"? Do you mean in Access?? Dave M. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.Exc...

COLOUR CHANGE IS A CELL
Cyber taz What I am trying to do is use say a red coulured cell but when text is added to the cell it changes colour to green. The other thing if possible a drop down menu in a cell so when clicked on it offers three of four selection For example today tomorow yesterday day after And once one wes highlighted it would show in the cell. Thankls for your help it is really apprereciated. You can use data validation to create a dropdown list in a cell. There are instructions in Excel's help, and here: http://www.contextures.com/xlDataVal01.html Mav wrote: > Cyber taz > What I am...

Puzzled by HPPT post Request Headers not arriving
Problem with HTTP Request Headers I have an app that uses an HTTP Post to send some stuff to a server and get some data back. It works OK but I would like to save bandwidth by compressing the return data. My problem is that the header that I want to send, to allow compression on the server, is not being received by the server. I have patched the serverscript to reflect back the headers and neither of the header strings seems to have got there. The post string itself gets there, but the 'Accept-Encoding' header does not. Please, what am I doing wrong? The code that tries...

CSV file with 13space characters in blank cells
In my office we've just received a recurring report which has been modified (by someone. Previously (a CSV file) the Data area (say A1:M30 ) had numbers or blank cells representing 0 (zero) values. Now, however the blank cells ARE NOT BLANK (although they appear blank) all cells without numbers have 13 hard-space values in them, which is causing #VALUE! problems; I temporarily added an intermediate sheet with formula: =IF(ISNUMBER(VALUE(MySheet!B2)),MySheet!B2,0) to eliminate the #Value! problem; Is there a better way? I'm sure there is, just not certain at this point in time. Any ...

Outlook Calendar views problem
Hey all... going to describe this to the best of my ability... but its one of those 'a picture would be worth a 1000 words' deals. Outlook Calendar views. We have a calendar shared among our entire company. In that Calendar we wish to create a timeline view availbale to anyone with permissions to view the calendar. We have created this view called 'timeline' and it appears that it is available to users of that folder. Sort of. Its there, but in teh outlook calendar / shared calendar / views pane, the view will ONLY show up when the calendars are in a timeline state as oppose...

Printing Portfolio view in Money 2006
Hi, I am viewing my portfolio...(from Home, Investing Home...Portfolio Manager) I try to print the portfolio...(Other tasks, More, Print, Portfolio Report). Nothing happens when I click on Print, Portfolio Report. I try using File, Print, also, nothing happens. I am using 2006, and have repaired my file, and rebooted my machine, but no luck. In microsoft.public.money, Curly_Money2006 wrote: >Hi, >I am viewing my portfolio...(from Home, Investing Home...Portfolio Manager) >I try to print the portfolio...(Other tasks, More, Print, Portfolio Report). >Nothing happens when I c...

View equations created in Word 2007
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: intel Greetings! I've successfully installed Office 2008 update 12.0.1 on my MacBook Pro running 10.5.2. One of the fixes that was listed in the Microsoft Knowledgebase article associated with the update was the ability to edit equations created in Word 2007 for Windows. After applying the update, I still get a warning message when opening a file created in Word 2007: "This file contains Word 2007 for Windows equations"; the document opens with placeholders (blank squares) instead of the equations. Does anyone el...