ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Count of non-blank cells. (https://www.excelbanter.com/excel-programming/278526-count-non-blank-cells.html)

EWill

Count of non-blank cells.
 
I am trying to get a count of non-blank cells so that I can use it as
an input to a range. I have tried the following but it only counts
the cells when I manually type something in the cell, not when I copy.

Set myRange = Range("A1.A65536")
myCount = Application.Count(myRange)

Please advise,

Ron de Bruin

Count of non-blank cells.
 
Hi EWill

Use the Function Counta to count the cells that are not empty

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"EWill" wrote in message om...
I am trying to get a count of non-blank cells so that I can use it as
an input to a range. I have tried the following but it only counts
the cells when I manually type something in the cell, not when I copy.

Set myRange = Range("A1.A65536")
myCount = Application.Count(myRange)

Please advise,





All times are GMT +1. The time now is 07:34 PM.

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