+ Reply to Thread
Results 1 to 5 of 5

VBA counting used entries in a range

  1. #1
    Registered User
    Join Date
    07-06-2009
    Location
    zürich, switzerland
    MS-Off Ver
    Excel 2003
    Posts
    36

    VBA counting used entries in a range

    hey

    i need to count the number of used entries in a range.

    so fex the range is A1:A10 but there are only 2 entries what i search is the number 2

    is there a VBA function or so doing that.

    ps i have this range.Rows.Count but this is counting me the length of the range even if there are no entries..

    thanks
    Last edited by f_mayr; 07-22-2009 at 04:16 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VBA counting used entries in a range

    Without knowing how A1:A10 are populated (ie are they blanks or formula nulls ?) it's hard to give precise answer but you could try:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-06-2009
    Location
    zürich, switzerland
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: VBA counting used entries in a range

    nope thats not working. it just gives me 1 even if there are 3 entries in the range

    the entries are dates and if there is no entry it is just blank...

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: VBA counting used entries in a range

    Post a sample where you are getting 1 rather than 3... are you referencing the correct range ? Is your range as straight forward as A1:A10 or is it being set by some other code etc ?

  5. #5
    Registered User
    Join Date
    07-06-2009
    Location
    zürich, switzerland
    MS-Off Ver
    Excel 2003
    Posts
    36

    Re: VBA counting used entries in a range

    im sorry now its working. i used a false range.

    thanks alot!

+ 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