titles at top of each page

%3CLINGO-SUB%20id%3D%22lingo-sub-1090972%22%20slang%3D%22en-US%22%3Etitles%20at%20top%20of%20each%20page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1090972%22%20slang%3D%22en-US%22%3E%3CP%3Eexcel%20365%20-%20is%20there%20a%20way%20to%20have%20a%20different%20title%20on%20each%20page%20where%20the%20data%20for%20the%20title%20field%20comes%20from%20a%20field%20on%20that%20page%20-%26nbsp%3B%3C%2FP%3E%3CP%3Ethank%20you%20for%20any%20help%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1090972%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1091166%22%20slang%3D%22en-US%22%3ERe%3A%20titles%20at%20top%20of%20each%20page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1091166%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20is%20possible%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F506442%22%20target%3D%22_blank%22%3E%40M_Hesen%3C%2FA%3E%20with%20Excel%20VBA.%20Do%20you%20have%20some%20experience%20here%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20is%20a%20BeforePrint%20event%20so%20when%20somebody%20prints%20we%20can%20have%20the%20macro%20run%20and%20use%20a%20cell%20value%20from%20the%20sheet%2Fpage%20in%20the%20header.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOpen%20the%20Visual%20Basic%20Edit%20with%20the%20Alt%20%2B%20F11%20keyboard%20shortcut.%3C%2FP%3E%3CP%3EDouble%20click%20ThisWorkbook%20for%20the%20file%3C%2FP%3E%3CP%3ESelect%20Workbook%20and%20BeforePrint%20from%20the%20two%20drop%20down%20lists%3C%2FP%3E%3CP%3EEnter%20the%20following%20code%20shown%20in%20the%20image.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163796i5DF84C2D1CE155F2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22print-different-titles.png%22%20title%3D%22print-different-titles.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThen%20when%20you%20print%2C%20you%20can%20print%20just%20one%20sheet%2C%20or%20change%20the%20print%20the%20entire%20workbook%20and%20each%20sheet%20will%20use%20the%20info%20from%20cell%20A1%20in%20the%20header.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20also%20attached%20a%20working%20example.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1091553%22%20slang%3D%22en-US%22%3ERe%3A%20titles%20at%20top%20of%20each%20page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1091553%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F506442%22%20target%3D%22_blank%22%3E%40M_Hesen%3C%2FA%3E%26nbsp%3BI%20suppose%20by%20each%20page%2C%20you%20mean%20each%20sheet%20and%20as%20a%20title%20you%20mean%20title%20as%20the%20one%20on%20the%20picture%20below%20(Weekly%20Sales%20%26amp%3B%20Bonus%20Payout).%20Is%20that%20correct%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F163847iDDBB198AD8B4DEE6%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22Screenshot%202020-01-05%20at%2022.04.00.png%22%20title%3D%22Screenshot%202020-01-05%20at%2022.04.00.png%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20this%20is%20the%20case%2C%20you%20could%20simply%20just%20reference%20this%20title%20to%20the%20desired%20cell(s).%3C%2FP%3E%3CP%3ELet%20me%20know%20if%20this%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%2C%3C%2FP%3E%3CP%3EBranka%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1964474%22%20slang%3D%22en-US%22%3ERe%3A%20titles%20at%20top%20of%20each%20page%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1964474%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F234876%22%20target%3D%22_blank%22%3E%40Branka%20Bradule%3C%2FA%3EI%20want%20to%20VIEW%20titles%20at%20the%20top%20of%20each%20page%20when%20browsing%20a%20spreadsheet.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

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

3 Replies

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.

print-different-titles.png

 

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.

@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?

 

Screenshot 2020-01-05 at 22.04.00.png 

 

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

@Branka BraduleI want to VIEW titles at the top of each page when browsing a spreadsheet.