Link to home
Start Free TrialLog in
Avatar of swjtx99
swjtx99

asked on

Count of rows in header

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 = ""
    With ActiveSheet.PageSetup
        .LeftHeader = "&""Arial,Bold""&10Count = " & Cells.SpecialCells(xlCellTypeLastCell).Row - 1

Thanks in advance,

swjtx99
ASKER CERTIFIED SOLUTION
Avatar of dlmille
dlmille
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of swjtx99
swjtx99

ASKER

Hi Dave,

Thank you very much. Works perfectly.

swjtx99