PDA

View Full Version : Quick CountA question



crugg
02-17-2009, 08:19 AM
Hello -

How would you write the code to set a variable (integer) to the number of rows that contain data/text in a sheet?

I cant use specialcells/LastCell for various reasons. Has to be CountA or some other solution that I dont know of.

Thanks!

Bob Phillips
02-17-2009, 08:47 AM
myVar = Application.CountA(Columns("A"))

chungtinhlak
02-17-2009, 08:48 AM
Counta will only count non blank cell, is it all data or just text data?