ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Active cell counting in particular print page (one sheet having different print area) (https://www.excelbanter.com/excel-worksheet-functions/57090-active-cell-counting-particular-print-page-one-sheet-having-different-print-area.html)

ananthmca2004

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

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


--
ananthmca2004
------------------------------------------------------------------------
ananthmca2004's Profile: http://www.excelforum.com/member.php...o&userid=29055
View this thread: http://www.excelforum.com/showthread...hreadid=487865


antoka05

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

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 the
sheets 'Index1'


--
antoka05
------------------------------------------------------------------------
antoka05's Profile: http://www.excelforum.com/member.php...o&userid=29024
View this thread: http://www.excelforum.com/showthread...hreadid=487865



All times are GMT +1. The time now is 08:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com