ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   counta in vba (https://www.excelbanter.com/excel-programming/288917-counta-vba.html)

Lawlera

counta in vba
 
I have been trying to assign a value to x derived from the counta function.

I have tried:
dim x as integer
x = Application.CountA("A:A")
Range("b2").Value = x

but it seems to perpetually report the value of 1.

Appreciate any help.

Ron de Bruin

counta in vba
 
Use this lawlera

x = Application.CountA(Range("A:A"))




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



"lawlera" wrote in message ...
I have been trying to assign a value to x derived from the counta function.

I have tried:
dim x as integer
x = Application.CountA("A:A")
Range("b2").Value = x

but it seems to perpetually report the value of 1.

Appreciate any help.





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

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