I am currently using the following to count and return the number of rows on the sheet that contain data, in the header. The problem is that the SpecialCells doesn't work after deleting some lines (unless I resave and that is not possible) so I am searching for an alternative.
ActiveSheet.PageSetup.PrintArea = ""
.LeftHeader = "&""Arial,Bold""&10Count = " & Cells.SpecialCells(xlCellTypeLastCell).Row - 1
Thanks in advance,