Active cell counting in particular print page (one sheet having different print area)

A

ananthmca2004

i have a excel sheel with different print pages separeted by print area
like


page1

page2

page3

like that

but i want to count the number of active cells on each print area
(page).

i know the function to count all acitves cells in a page (whole sheet)
application.counta(range(a:a))

expecting reply asap
 
A

antoka05

you can do so:
cellNumber = range(ActiveSheet.PageSetup.PrintArea).Cells.Count

or, for a particular sheet, you can do so:
cellNumber = range(sheets("Index1").PageSetup.PrintArea).Cells.Count
and so you will have the number of cells in the print area of th
sheets 'Index1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top