Insert text in the header of a spreadsheet from text in a cell

Asked

Viewed 1,155 times

1

To configure the header of a spreadsheet I go to Configure Page > Header/Footer > Customize header. Let’s say, in the center section, I want to see a headline that’s in cell A1. How can I do this?

2 answers

1

Everything indicates that what I want is not possible without resorting to VBA (link); Apparently you would have to do a macro to fill the section of the respective header.

Sub HeaderFromA1()
    ActiveSheet.PageSetup.LeftHeader = Range("A1").Value
End Sub

1

Hello! Unfortunately with the Header/footer feature of the Excel Page Setup is not possible, but you get the same result with another feature without using VBA.

  1. In Excel, click on the PAGE LAYOUT tab
  2. Then click on PRINT TITLES
  3. In the window that will open, click on the SHEET tab
  4. In the "Repeat lines at the top" field, choose the entire cell or row you want to use as the header or footer for all pages.
  5. Click OK and view the print

Hugs! www.learnoffice.com.br

Browser other questions tagged

You are not signed in. Login or sign up in order to post.