[AccessD] How many rows populated in range

Hale, Jim Jim.Hale at FleetPride.com
Thu Feb 2 11:31:00 CST 2006


 y = appXcel.WorksheetFunction.CountA(wksUpl.Range("A:A")) counts the of
cells that are not empty in the specified range. This works great assuming
the indicated column  does not have empty cells interspersed.
Btw way why not use dynamic ranges? Ie the range names in Excel
automatically change depending on their size. See
http://www.ozgrid.com/Excel/DynamicRanges.htm

Jim Hale

-----Original Message-----
From: John Colby [mailto:jwcolby at colbyconsulting.com]
Sent: Thursday, February 02, 2006 11:01 AM
To: 'Access Developers discussion and problem solving'
Subject: [AccessD] How many rows populated in range


Does anyone know how to determine how many rows of a range are actually
populated with data?

I have a range with 

Doc	DocDescr	Otherstuff	etc
1A	Some Desce	Etc		Etc
1Ai	Other Descr	Etc		Etc

The range is potentially up to a hundred and some rows.
Doc and DocDescr will always have data in it, but the other columns might
not.

Is there any property of the range that says what the last occupied row is?

Are there iterators for ranges, i.e. "for each row in Range" kind of thing?

John W. Colby
www.ColbyConsulting.com 


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

***********************************************************************
The information transmitted is intended solely for the individual or
entity to which it is addressed and may contain confidential and/or
privileged material. Any review, retransmission, dissemination or
other use of or taking action in reliance upon this information by
persons or entities other than the intended recipient is prohibited.
If you have received this email in error please contact the sender and
delete the material from any computer. As a recipient of this email,
you are responsible for screening its contents and the contents of any
attachments for the presence of viruses. No liability is accepted for
any damages caused by any virus transmitted by this email.


More information about the AccessD mailing list