Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Quickly count used rows?

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 151
Default Quickly count used rows?

Hi Rob

Assuming your cell Range Is A2 to I61 then

If the range is populated with Alhpa characters, then
=COUNTIF($A$2:$I$61,"""")


If the rnage is populated with Numeric, then
=COUNTIF(A2:I61, "0")

or, if there is a mix of Alpha-Numerics
=COUNTA($A$2:$I$61,"""")

HTH
Mick.
  #3   Report Post  
Posted to microsoft.public.excel.programming
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.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Quickly count used rows?

That works for ONE row. My sheet has 60 rows and 9 columns.
Is this forumula missing something?


"plinius" wrote in message
...


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

Is this enough FAST?
E.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 158
Default Quickly count used rows?

On second test, your formula does work. Interesting solution!

Thank you!


"Robert Crandal" wrote in message
...
That works for ONE row. My sheet has 60 rows and 9 columns.
Is this forumula missing something?


"plinius" wrote in message
...


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

Is this enough FAST?
E.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Quickly count used rows?

Il 18/09/2012 21:18, Robert Crandal ha scritto:
On second test, your formula does work. Interesting solution!

Thank you!



Glad to help. Thanks for the feedback ;-)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenate many rows quickly [email protected] Excel Worksheet Functions 5 March 31st 08 12:09 AM
How to quickly paste almost same formula to set rows? cardingtr Excel Discussion (Misc queries) 3 February 20th 06 07:53 PM
How to quickly insert a blank row every 5 rows? Med Excel Discussion (Misc queries) 2 September 10th 05 12:32 AM
count based on two fields - need quickly JO Excel Worksheet Functions 1 November 1st 04 09:44 PM
select alternate rows - quickly RC Excel Programming 7 August 19th 04 10:50 AM


All times are GMT +1. The time now is 06:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"