View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
plinius plinius is offline
external usenet poster
 
Posts: 51
Default Quickly count used rows?

Il 18/09/2012 10:48, Robert Crandal ha scritto:
Suppose I have a 60 x 9 cell range that is initially empty.
Users will be able to fill data into each row. Is there a
quick and efficient method to count how many rows
contain data?? (A row is considered to contain data if
any one more cells of the 9 columns of that row contain
any type of data)

IMPORTANT:

I would like to be able to retrieve the count of used rows every
time data is added or deleted from the 60x9 cell range.

Also, I'm looking for a FAST way to count the number of rows that
contain data. I already know that I can scan each row one at a time
and get the count, but I'm interested in a faster technique since my
table will likely be much bigger than 60 rows. Isn't there a faster
scheme that handles the "Worksheet_Change" event to retrieve
the count of used rows in a range??

I'd appreciate any innovative ideas here. Thank you!

Robert




=SUMPRODUCT(--(SUBTOTAL(3,OFFSET(A1:I1,ROW(1:60)-1,))0))

Is this enough FAST?
E.