troubleshooting Question

Count of rows in header

Avatar of swjtx99
swjtx99 asked on
Microsoft Excel
2 Comments1 Solution310 ViewsLast Modified:
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,

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros