whats the best way to count how many cells are occupied in a column. ive looked for counta in the help files but cant find it?
whats the best way to count how many cells are occupied in a column. ive looked for counta in the help files but cant find it?
from the help file
COUNTA
Counts the number of cells that are not empty and the values within the list of arguments. Use COUNTA to count the number of cells that contain data in a range or array.
Syntax
COUNTA(value1,value2,...)
Value1, value2, ... are 1 to 30 arguments representing the values you want to count. In this case, a value is any type of information, including empty text ("") but not including empty cells. If an argument is an array or reference, empty cells within the array or reference are ignored. If you do not need to count logical values, text, or error values, use the COUNT function.
Example
The example may be easier to understand if you copy it to a blank worksheet.
=COUNTA(A2:A8) Counts the number of nonblank cells in the range A2:A8
VBA - The Power Behind the Grid
Posting a sample of your workbook makes it easier to look at the Issue.
how do i do this in VB though?
In VB help see 'Using Microsoft Excel Worksheet Functions in Visual Basic' and 'List of Worksheet Functions Available to Visual Basic'Originally Posted by ceemo
for a variable range, the codeshould helpPlease Login or Register to view this content.
---
Last edited by Bryan Hessey; 09-27-2006 at 01:52 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks