I have a workbook with multiple sheets in it, all with similar headers, but with the headers appearing on different rows. One common header is “Date From” that is in multiple sheets appearing in different rows, but all in the same column (Column A).
I am looking for a macro that will loop through all the worksheets, find the word “Date From” in a cell in Column A, and make that row the “rows to repeat at top” option that is found under the “Print Titles” section of Excel.
Code I have found so far is Sheets(i).PageSetup.PrintTitleRows = "$1:$1" for specifying row 1 as your row to repeat, just not sure how to use a variable to specify it. Any info is appreciated.
Bookmarks