Jan 04 2020 02:14 PM
excel 365 - is there a way to have a different title on each page where the data for the title field comes from a field on that page -
thank you for any help
Jan 05 2020 12:32 AM
This is possible @M_Hesen with Excel VBA. Do you have some experience here?
There is a BeforePrint event so when somebody prints we can have the macro run and use a cell value from the sheet/page in the header.
Open the Visual Basic Edit with the Alt + F11 keyboard shortcut.
Double click ThisWorkbook for the file
Select Workbook and BeforePrint from the two drop down lists
Enter the following code shown in the image.
Then when you print, you can print just one sheet, or change the print the entire workbook and each sheet will use the info from cell A1 in the header.
I have also attached a working example.
Jan 05 2020 01:06 PM
@M_Hesen I suppose by each page, you mean each sheet and as a title you mean title as the one on the picture below (Weekly Sales & Bonus Payout). Is that correct?
If this is the case, you could simply just reference this title to the desired cell(s).
Let me know if this helps.
Best,
Branka
Dec 07 2020 01:43 PM
@Branka BraduleI want to VIEW titles at the top of each page when browsing a spreadsheet.