Results 1 to 3 of 3

Counting rows in a range object?

This is a discussion on Counting rows in a range object? within the Excel Questions forums, part of the Question Forums category; Does anyone have a quick function that is passed a range and returns the number of rows in it? I ...

  1. #1
    Err
    Err is offline
    Board Regular Err's Avatar
    Join Date
    Nov 2006
    Location
    Boston, MA
    Posts
    255

    Default Counting rows in a range object?

    Does anyone have a quick function that is passed a range and returns the number of rows in it?

    I could use one to analyze and to (count rows).


    Thanks,

    Eric

  2. #2
    MrExcel MVP
    Moderator
    Scott Huish's Avatar
    Join Date
    Mar 2004
    Location
    Oregon
    Posts
    17,044

    Default

    How about something like this?


    Code:
    Sub test()
    MsgBox Range("A2:A592").Rows.Count
    End Sub
    Office 2007/2010

  3. #3
    Err
    Err is offline
    Board Regular Err's Avatar
    Join Date
    Nov 2006
    Location
    Boston, MA
    Posts
    255

    Default

    See, I knew it was easy.

    thanks

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com