![]() |
How do I put a specific cells information in the header or footer.
I am wondering if it is possible to put the info from a specific cell in a
excel workbook into the Header or Footer |
How do I put a specific cells information in the header orfooter.
On Nov 26, 10:38 am, bannshy9
wrote: I am wondering if it is possible to put the info from a specific cell in a excel workbook into the Header or Footer The only way you can include info from a specific cell is to use Excel VBA: You can include the value of a cell in the header. For example, the following code will put the value of cell B5 on Sheet2 into the header of the activesheet. ActiveSheet.PageSetup.LeftHeader = _ Format(Worksheets("Sheet2").Range("B5").Value) |
How do I put a specific cells information in the header or footer.
You need to use VBA to do that. Right-click the Excel LOGO (Near the file
menu) and select View Code, paste this in (edit it to suit): Private Sub Workbook_BeforePrint(Cancel As Boolean) ActiveSheet.PageSetup.LeftHeader = Range("A12").Value End Sub Bob Umlas Excel MVP "bannshy9" wrote: I am wondering if it is possible to put the info from a specific cell in a excel workbook into the Header or Footer |
All times are GMT +1. The time now is 01:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com