14. Protection, Sharing and Printing
14.6 Header and Footer in Excel
Make a loose page recognizable. A header can identify the report and time period. A footer can show which sheet and page it came from. Use Excel's built-in page fields so the numbers adjust when pagination changes.
Help the reader put the pages back in order
A team prepares a fictional FreshGo Maharashtra city report. A reviewer prints the packet, then places a page beside notes for the meeting. That page has a table, but the reader cannot tell whether it is a separate report or a continuation. A print header and footer provide the missing context without adding data rows.
This lesson keeps the original city-report example and a client-packet scenario that might be familiar to a team preparing a review at a company like Infosys. All amounts, roles and procedures here are practice examples. We will identify the report, show page fields, and verify a first-page variation from an actual preview.
Use each printed region for a clear job
- Header: a printed area near the top. Use it for a concise report title, reporting unit or period.
- Worksheet body: the cells containing business data. Keep the table column labels and verified totals here.
- Footer: a printed area near the bottom. Use it for page numbering, a current print date, an approved identifier or a sheet name.
- Print Titles: an Excel setting to repeat selected source rows or columns on printed pages. It repeats the labels in the data grid, which serve a separate job from the page header.
Someone who works in the file every day may know the sheet's name from memory. The printed page has no sheet tabs. Add stable labels that carry the intended information with the file wherever it is read.
Add a header or footer in the supported desktop layout
Choose the worksheet and open Page Layout view
On a supported desktop Excel worksheet, select the desired sheet and choose Insert → Header & Footer from the applicable ribbon group. On the documented Windows route Excel enters Page Layout view. You can click a left, center or right section for the header or footer. Page Setup's Header/Footer tab offers a dialog route, including Custom Header or Custom Footer. Microsoft's page-number instructions also describe the Mac controls.
Type the exact title in one section. For this example use “FreshGo Maharashtra | March 2026” in the centered header. Add page context separately at the bottom. Choose a section and use available element buttons for Page Number, Number of Pages, Current Date, Sheet Name, File Name or Picture where applicable. Button placement and UI labels can vary. Pick the fields the reader needs, then verify what is rendered.
When you have finished editing, click away from the section as the desktop instructions describe. Choose View → Normal to return to the regular grid. The header and footer are visible in appropriate page-oriented views and the printed result. If they disappear from Normal view, check Page Layout or Print Preview before recreating them. For chart sheets use the applicable Page Setup path.
Use a field when the value is meant to change
Type “Page ”, insert the Page Number field, type “ of ” and insert the Number of Pages field. The editor can show a field code such as Page &[Page] of &[Pages]. Excel renders the current page and page count in an appropriate print view. Typing “Page 1 of 5” literally stores those characters. That fixed label would repeat on every page of a normal identical-footer setup even if there are more than five pages.
| Element | Short example | Meaning |
|---|---|---|
| Page Number and Number of Pages | Page &[Page] of &[Pages] | Numbering in the actual previewed output |
| Sheet Name | &[Tab] can render Orders | The worksheet's actual name |
| Current Date | &[Date] | Current date at printing, with environment's presentation |
| Fixed reporting cutoff | Data through 31 March 2026 | A deliberate label for the recorded period |
Separate the report date from the printing date
The workbook can describe March activity and be printed in April or later. A dynamic date in the footer reports an output date. It does not prove when the source was updated or what period the data covers. Put “March 2026” or “Data through 31 March 2026” in the right place so the reader can distinguish it from “Printed” followed by the current date field.
If you export to PDF, the displayed header or footer becomes part of that saved page output. Opening an earlier PDF later does not refresh the report or change its printed cutoff. Keep a clear date and scope in the workbook and match them in the export verification. When using several localized output environments, check how short dates are presented. A spelled-out fixed day and month can be easier for an international reader to interpret.
Choose which pages get each label
Use the normal setup for consistent page labels
A report with one header and footer style can repeat identification on every applicable page. For the standard lab, leave first-page and odd/even variations off. Check the footer in Preview after adding elements, then inspect a later page if there is one. Confirm the current page number advances while the report title stays the same.
If a teacher requests a different first page, Excel's Different First Page option lets you set first-page header and footer content separately where supported. If the special first-page fields are empty, the first page can lack information that appears on the later pages. Populate the first-page sections deliberately if your design calls for page numbering there. Do not assume that editing the standard footer also updates the distinct first-page one.
Use odd and even variants when they support the packet
Different Odd & Even Pages can give two different placements or labels to alternating pages. A double-sided packet might place the page number toward the outer edge on both sides. Inspect the actual odd and even fields, and confirm the page layout in your selected output. A blank variant can lead to apparently missing labels on alternating pages.
Keep the first-page setup off when learning odd/even differences for the first time. This reduces interactions between variants while testing. Once the separate options are understood, combine them only if the report requires both and preview each page type. The actual number of pages depends on the printer, print area and layout settings.
Review scale, margins and changes in formatting
Scale with Document controls whether header and footer text scaling follows the worksheet scaling in applicable desktop versions. If the worksheet is reduced heavily, a scaled header may be harder to read too. Adjust that option deliberately and compare the actual size. Align with Page Margins controls whether the header and footer align with the sheet margins, where supported. Check the placement after changing margins or orientation.
Keep labels short and use readable text. Long text in all three sections can compete for space. Place the most important title or period where it will remain legible, and avoid duplicating a dense worksheet heading in the header. If a logo is allowed, use a small approved graphic and inspect its fit after scaling. A header picture can be available through the supported Picture control. Review the printed result instead of trusting the placeholder text shown in edit mode.
Follow the footer from editing to printed output
Open the right view
Select the Orders worksheet and use the supported Header & Footer editor. The normal worksheet grid does not show the page regions.
Choose meaningful fields
Put the report title in the header. Put the Sheet Name and page fields in footer positions. Use a separate fixed cutoff label if the reporting period matters.
Leave edit mode and preview
Confirm the names and page fields render. Check the first output page and subsequent pages where applicable.
Verify the saved result
After any changes in scale, page variants, paper or scope, inspect which labels and numbers the reader will actually see.
Lab 1 · Build the March city summary with a useful footer
Prerequisites. Use a scratch workbook and a worksheet named Orders in a supported desktop version. Start at A1 with the headings and three fictional city summaries below, with the last row as a formula total. Use a known desktop preview path. Keep a copy of the numeric report before changing headers.
| City | Orders | Amount ₹ |
|---|---|---|
| Pune | 12 | 1,800 |
| Nashik | 8 | 1,250 |
| Nagpur | 6 | 950 |
| Total | 26 | 4,000 |
- Enter the data through row 4. Put Total in A5, use
=SUM(B2:B4)in B5 and=SUM(C2:C4)in C5. Expected controls are 26 orders and ₹4,000. Set an intended print area of A1:C5 if the exercise version supports it. - Open the header and footer editor. Center the literal header text “FreshGo Maharashtra | March 2026.” Leave special first-page and odd/even variants off for this controlled example.
- Put the Sheet Name element at left in the footer and insert current page and total page fields at center. At right use “Data through 31 March 2026” as a fixed label. Keep footer sections legible in your page orientation.
- Open Preview. Look for the title, sheet name Orders, rendered page text, data cutoff and last worksheet row with 26 and ₹4,000. If the small table fits on one page with your settings, the page fields should show Page 1 of 1 under the default numbering for the single-sheet print job. Otherwise inspect the actual numbering and find all expected cells.
- Try replacing the right-side field in a scratch copy with “Printed ” plus the Current Date element. Compare it with the fixed March cutoff. Restore the cutoff label or show both deliberately if there's room.
- In another scratch state, use the supported header/footer dialog to select no header or clear only the header section text. Verify the footer and worksheet data remain as intended. Restore the approved title and save or discard the example.
Troubleshoot and finish. If the footer shows literal or repeated numbers, examine whether you inserted the fields. If both header and footer are absent, check Page Layout or actual Preview rather than the Normal editing grid. Verify the intended worksheet is selected. Keep the correct figures in the body when removing or replacing the decorative regions.
Lab 2 · Give the first page and continuation pages their own context
Prerequisites. Use a separate sheet named OrdersDetail with headings OrderID, City, Status and Amount in A1:D1. In A2 enter ="HF-"&TEXT(ROW()-1,"000"). In B2 enter =IF(ROW()<26,"Pune","Nagpur"). Enter Delivered in C2 and numeric 50 in D2. Fill A2:D49. This produces 48 distinct fictional rows, with exactly 24 per city. In row 50 put Total and =SUM(D2:D49) in D50.
- Check A2 is HF-001 and A49 is HF-048. The first Nagpur record is HF-025 on row 26. The overall control amount is ₹2,400 across 48 records, with ₹1,200 for each city.
- Use A1:D50 as the intended print area. Use compatible fixed percentage scaling. Insert a manual horizontal break before row 26 on supported desktop Excel so continuation can be inspected. Preview the actual page count rather than promising a known count across devices.
- Set the normal header to “March Orders | Detail continuation” where it fits readably. Set a normal center footer using page fields. Use the supported Different First Page setting and add “March Orders | Detail packet” to the distinct first-page header and the necessary page fields to its footer.
- Inspect the first page in Preview, then a later one. Expect the first page's distinct title, later pages' continuation label and page numbers appropriate to the current print job. If some pages lack an expected label, check the applicable header/footer variant.
- In a separate practice copy turn the first-page variant off, then prepare different odd and even footer positions if your version supports them. Keep the page fields in both. Verify navigation across at least two actual pages, noting there may be more depending on the layout.
- Restore or keep the candidate that matches the classroom brief. Verify the page containing the last detail still shows HF-048, and the intended final output includes 2,400. Save the practice setup separately. Print paper only if needed.
Troubleshoot and finish. If the output unexpectedly fits on one page, inspect the scaling choice and whether the manual break participates. If your version doesn't offer a first-page control, review the documented desktop route and continue with standard fields. Do not assume fixed worksheet scaling or paper. The content and field behavior are the checks.
Choose fields and fixed text with care
Use the actual workbook or worksheet name only when it helps
A sheet name field can show Orders on the first lab. If the owner renames that worksheet Orders_March in a scratch copy, preview the sheet-name field again. The field follows the relevant sheet label. A fixed text label such as “Orders for March” stays unchanged until an owner updates it. Decide whether the worksheet's internal name is meaningful to the printed reader. An abbreviation like T1 can be clear to the workbook author and opaque in a packet.
File Name and File Path can be available as separate page elements in supported versions. A full path can reveal folder names or computer-specific locations that do not belong in a public-facing copy. Use a short approved document identifier when the reader only needs a reference. Open the actual exported result to confirm no unexpected paths or draft names are shown. Dated file naming can help identify the source while keeping private working labels out of the report.
For literal text with an ampersand, desktop Microsoft documentation describes typing two ampersands in the header/footer editor. For example, type Orders && Fulfilment to show “Orders & Fulfilment.” This is distinct from inserting a built-in element. Click away or open Preview to see its rendered text before saving. In a localized Excel version prefer the available buttons so Excel inserts a valid field for the chosen UI.
Give clear dates to a printed audience
Consider a note with “March 2026” at top and “Printed ” followed by Current Date in the footer. A later printed output could say “Printed 02 Apr 2026,” depending on the environment's date layout. That output timestamp and the March reporting period are compatible. If the available source only covered records through 29 March, putting “Data through 31 March” on the page would still be wrong even if you printed on 2 April. Verify the scope before typing a fixed date.
Use controls to compare dates on a scratch file. Keep the title saying March 2026. Put “Data through 31 March 2026” in a worksheet cell that you include in the print area. Add a Current Date field in the footer. Open Preview and compare both labels. This design makes it clear which date came from the reported content and which comes from a printing setting.
If you export the workbook and later update the worksheet, open the PDF you already exported. Its output dates and displayed amounts stay in that snapshot. To deliver a new result, create a new output and identify its reporting period. When reviewing an older report, use its own page labels, not the current workbook name or today's date.
Choose page numbering that fits the scope
For one active worksheet using default page numbering, check the first page and the last page labels. If the preview has two pages, review that they show Page 1 of 2 and Page 2 of 2 when the fields are configured that way. For a packet containing multiple sheets, headers and footers are separate sheet settings. Excel has options for a first page number and can support manual sequencing of worksheet page numbering. Verify the actual order and page count after grouping or selecting other sheets.
Suppose a deliberate separate packet has a one-page summary and then a detail section with two previewed pages. If your goal is a continuous 1–3 label, verify the numbering settings for both worksheets and how the fields appear in the actual output. Alternatively prefix “Summary” and “Detail” in the header and number each approved part according to its own convention. State which convention you chose. If a sheet expands after a row is inserted, recheck the numbering rather than reusing a prior start number blindly.
Make the report identity and the column headings work together
Repeat context without copying rows into the source
Suppose each printed order page needs the title “March Orders” and column names OrderID, City, Status, Amount. Put the report title in the page header and use Print Titles for the actual source row 1 on supported desktop Excel. The title explains the printed packet. The repeated column names explain which data field each cell belongs to on any page. When both are present, someone reading a loose page can identify the report and interpret the amounts.
Do not insert the column labels as extra source records every twenty rows. That can break sorting and totals if Excel considers them data. Keep a single genuine header row in the worksheet and use the print-specific setting for later pages. Check the first and subsequent pages to make sure the title and headings each appear once in useful positions. If your sheet already has a long title row as part of the area, decide whether that row needs to be repeated with the field labels or whether the header can carry the identity alone.
Freeze Panes can keep headings visible when somebody scrolls through the workbook. A header or Print Titles controls printed output where supported. Test the wanted environment. The presence of headings when you scroll is useful in the workbook, while Print Preview supplies the printed evidence. Printed page numbering also won't make worksheet row numbers appear as data fields unless you select that different print option.
Check each of the left, center and right sections
The typical section layout offers three useful positions. A short sheet name at left, page fields at center and a compact scope label at right can fit in a landscape report. If all three sections contain lengthy text, they can compete for available width after scaling. Compare your long texts at the intended page size. If the positions overlap visually or a label is clipped, shorten text, change layout or move a label into the worksheet body where it will be read.
Use Page Setup or the header/footer controls to format text where supported. Keep page numbers legible and use sufficient contrast. If you switch off Scale with Document because the body must be scaled down, check whether an unscaled header still fits the available space. Numerical scale controls apply differently depending on the setting. Preview text placement and size together, including empty space above the first worksheet row.
If you publish front and back pages, an odd/even layout may put labels toward the outside edge. Visualize one odd page and one even page side by side. Then verify the printer's actual duplex format and selected page numbering. Different odd/even text is helpful when the pages will be arranged accordingly. A plain classroom PDF can often use the same layout all the way through.
Keep optional graphics separate from the core message
You can use an appropriate small logo in a supported header area for a report that has permission and needs branding. Use Picture in the desktop header/footer controls and verify how it renders. A logo taking too much space can push the title or compete visually with field headings. Provide the report name as text too so readers can identify the document without depending on an image.
A basic teaching workbook can show a plain text report label instead. Removing a picture or changing header text should leave the worksheet values intact. Test an edited copy with the same source totals and page labels after removing the nonessential graphic. Keep the copy with the settings that best meet the actual brief.
Diagnose a missing, clipped or misleading label
The footer looks blank
First check which view is active. A missing footer in the ordinary grid can be expected because the page information is shown in Page Layout and print-related views. If Preview is also missing it, check the chosen sheet and settings. A workbook with multiple similarly named tabs can have a footer on one sheet and no footer on another. Confirm the active tab and scope before recreating a footer elsewhere.
If only the first page is empty, check Different First Page and populate its own region if that is the intended style. If every other page lacks a label, inspect Different Odd & Even Pages. Compare those settings against your saved default. A report can have a perfectly configured normal Footer with a different variant currently in use. Inspect each relevant page state with its actual number visible in Preview.
A page shows the editing code or a literal number
If you're inside the editing box, field codes such as &[Page] can appear ready to edit. Click elsewhere and check Preview. If all pages show the same static number there, verify the dynamic page elements were inserted. A short goal such as “current page of total pages” is easier to verify across a known two-page preview than by looking only at the first page.
In an approved scratch state, type ordinary text “Page 1 of 2” in a footer and compare its behavior with the dynamic fields. With a multi-page output and one uniform footer, the same text can repeat. Insert the appropriate fields using the app's controls, then confirm the numerators advance. The exercise is a comparison of output behavior and uses no change to any worksheet cells.
The date or scope no longer matches the body
Check fixed text and dynamic fields separately. For example, changing the report body from March to April in a working copy won't automatically update a title typed as March. The Current Date field can still show the output date. Update the intended period label and source content together. Review which normal and alternative headers contain a copied fixed month. Compare the table's dates, total and header on each previewed section before delivering.
Any content outside the data grid can still be visible in the printed packet. If the output is for another audience, inspect the title, sheet name, date, file identifier and any optional path or logo. A well-formatted header can contain a draft project name that is inappropriate for external review. Confirm audience scope and use a report-safe label in the copy itself.
Verify the workbook or PDF in its final saved state
For the short report, note “Orders, March, 26 records summarized and ₹4,000, sheet and page fields readable.” For the detailed exercise, write “OrdersDetail, HF-001 through HF-048, ₹2,400.” The two fixtures are independent. Check the first and last output pages using those exact values. If the body remains correct and the header changes when you select a different page style, record what changed so a reader understands the handoff.
After any edit to print area, orientation or page width, test again. The report might now produce a different number of pages. Page fields update based on the rendered job, while custom page sequence settings can also matter. Inspect the actual final view and an exported file if you produced one. A screenshot of an earlier preview can no longer verify changed settings.
Test an explicit page sequence in a scratch packet
Make two practice tabs called Brief and Detail. Configure the intended scopes on each and look at actual output page counts before setting a sequence. For a sample plan, suppose Brief previews one page and Detail previews two. The first Detail page should then carry the packet number 2 and its second page number 3. On supported desktop builds use Page Setup's First page number field for the intended start on the Detail tab and verify the displayed result. Leave the original job's settings unchanged.
- Start with page numbers rather than a custom combined count. Confirm the current label of the first Brief page and the first and last of Detail. If each starts at 1 in your configuration, a printed stack may contain two unrelated page 1 labels.
- Set the approved start for Detail based on the actual preceding pages. For one verified Brief page, the Detail start is 2. If Brief later consumes two pages, check the intended Detail start becomes 3. The planned range can shift when earlier output changes.
- Where supported, restore the default start by entering Auto when you're done. Verify the actual saved preview. Save the trial separately if it demonstrates a pagination convention used in class.
A custom page start does not by itself make a page-count field include an earlier document. Microsoft documents a Mac desktop example using an explicit adjustment when appending an Excel sheet after external pages. If two pages come from a separate document and Excel starts at 3, the appropriate custom footer can use Page &[Page] of &[Pages]+2 in that supported scenario. The adjustment counts known preceding pages. Recheck the formula and rendered result if that preceding packet changes. A simple alternative is to use just the current page label for separate assembled documents.
Follow a page that divides in both directions
For a deliberately wide and long report, each page may contain a rectangle within the worksheet. Imagine a preview with an upper-left, lower-left, upper-right and lower-right segment. A Down, then over order visits the lower-left before the upper-right. An Over, then down order visits the upper-right before the lower-left. The page number fields identify the corresponding order chosen in the actual setup. Neither order changes the worksheet data.
Check what a reader of the right-hand page needs. It may not contain the first column's identifiers. Use a supported print title to repeat that identifying column if it matters, and label the intended area and period in the header. In a small teaching workbook you can write the intended order next to your print settings. Preview the printed page labels and use that actual sequence instead of assuming a particular direction.
Keep separate settings for working and published views
The editing workbook may use a sheet name like Orders_ReviewDraft. The published packet can carry a clean stable label such as “March Orders Detail” if names underpin its identity. Test Sheet Name and fixed label in separate copies and compare the rendered text. If several sheets use an approved common header, be aware that changing settings with multiple tabs selected can affect the group. Inspect all relevant tabs, then ungroup before editing an unrelated sheet.
If you export only a subset of pages from an existing document or workbook, inspect whether the visible labels still correspond to the intended greater packet. A page labeled 4 may be appropriate when the file is a supplemental piece. If the audience expects a self-contained one-page extract, give it an appropriate title and preview the numbering under the actual export selection. Do not assume exporting a subset will always restart footer numbering.
In a page review, use the short report's ₹4,000 amount and title as two independent checks. A page from another worksheet can have the same generic page label but different data. Conversely the totals can be correct while the title uses the wrong month. Inspect the pairing of label, record range and amount on every approved section. Keep one document name and period in the output, and use the date and sequence fields only for additional context that the recipient can interpret.
Check a first-page footer without a page number
Check Different First Page. Add page fields to that distinct footer if the first page should show them.
Check a literal ampersand
On the desktop route described by Microsoft, enter two ampersands for one to appear as ordinary text. Confirm it in Preview outside editing mode.
Check the date of the report versus the day of printing
Use the fixed content cutoff for the records and the current date field for print context. They can be different dates in the same legitimate output.
Check an unexpected page count in the printed footer
Review the actual selected worksheets, page ranges, first-page number option and output settings. Inspect earlier and later pages in the saved job.
Quick quiz with explanations
1. Where do worksheet headers and footers appear?
A. Page-oriented views and output. B. In every cell in Normal view. C. In formulas in column A.
A. Check Page Layout or Print Preview. Normal view can omit page regions.
2. How do you display a custom current-page and total-page label?
A. Type the same Page 1 of 5 line on every page. B. Add the Page Number and Number of Pages fields with surrounding text. C. Fill down the order IDs.
B. The fields render the appropriate numbers under the selected print scope.
3. What date shows the reporting cutoff?
A. The labeled fixed cutoff that matches the data. B. Current Date always. C. The workbook's column count.
A. A current print date describes when output is prepared. Verify the expected data period separately.
4. What can explain why page 1 has no footer when page 2 does?
A. An enabled Different First Page setting with an empty first-page footer. B. A deleted order on page 2. C. Worksheet formula names.
A. Inspect both variants and set fields in the appropriate one.
5. Which setting can repeat the source columns' heading row?
A. Adding the file name element. B. Print Titles on the supported desktop workflow. C. Typing every heading into cells at fixed intervals.
B. A page header identifies the report, while Print Titles can repeat the row that labels the tabular fields.
6. What happens to the 26 orders and ₹4,000 when you remove the Lab 1 page header?
A. The source amounts are deleted. B. The worksheet calculation remains the same. C. Excel changes the reporting month.
B. Changing the top printed region doesn't alter the underlying worksheet cells.
Interview questions and example answers
- How would you give printed pages enough context?
- I put a concise report title and period in the header or approved report body, keep column names with the table and use page fields in the footer. I check a later page so it is understandable on its own.
- How do you add numbered pages?
- In desktop Excel I use the worksheet's Header & Footer feature or the Page Setup dialog. I insert page number and page count elements, then verify the actual numbers in Preview. I consider separate sheet settings when the packet spans several worksheets.
- Why might the regular footer be absent on the first page?
- The workbook can use a separate first-page variant. I check whether that setting is on and whether its footer content is defined. I also confirm the file is in a page-oriented view.
- What is the difference between a header and Print Titles?
- A header carries page-level identity. Print Titles can repeat selected rows and columns from the worksheet. In a multi-page detail report I want both the report period and the field labels to be clear.
- What is your approach to dynamic dates?
- I name the business period and cutoff in fixed text matching the approved worksheet. I use Current Date only when the output date adds context, and verify how both display for the intended audience.
- How do you know the finished PDF uses the correct layout?
- I open the actual saved file and inspect the first and last pages and any variants. I compare page numbers, labels and known body values. I also check readability after any layout or scale changes.
Revision cards
- Header Page-level context such as a title and reporting period.
- Footer Page continuity, an approved identifier or output date.
- Dynamic number Insert page and count fields instead of hard-coding the display.
- Visible checks Inspect Page Layout, Print Preview and the actual saved output.
- Variants First-page and odd/even options need their own text where enabled.
- Two dates A fixed business cutoff and the current printing date have different purposes.
Microsoft references
Continue practising: explore the existing Excel Task Hub for additional exercises.