+ Reply to Thread
Results 1 to 4 of 4

countA in VB

  1. #1
    Forum Contributor
    Join Date
    06-15-2004
    Posts
    246

    countA in VB

    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?

  2. #2
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    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.

  3. #3
    Forum Contributor
    Join Date
    06-15-2004
    Posts
    246

    how to do this i vb though?

    how do i do this in VB though?

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by ceemo
    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'


    for a variable range, the code
    Please Login or Register  to view this content.
    should help
    ---
    Last edited by Bryan Hessey; 09-27-2006 at 01:52 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1