+ Reply to Thread
Results 1 to 12 of 12

What does the rows.count expression do

  1. #1
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    What does the rows.count expression do

    Hello. What does this rows.count expression do?
    Please Login or Register  to view this content.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: What does the rows.count expression do

    Rows.count returns the total number of rows in Excel. So excel 2003 and earlier will return 65536 and 2007 version onwards will return 1048576.

    And here code is selecting the next available row at bottom of column A.. . it is something like you go to a1048576 and press ctrl + up arrow and then you can move one cell down


    Regards,
    DILIPandey
    <click on below * if this helps>
    Last edited by dilipandey; 06-24-2013 at 12:14 PM. Reason: explanation corrected
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: What does the rows.count expression do

    press ctrl + up arrow
    will not work if you have blank rows in-between.

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: What does the rows.count expression do

    I guess it will travel through all blank rows and stop as soon as it touches any date available at up side.

    Regards,
    DILIPandey
    <click on below * if this helps>

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: What does the rows.count expression do

    I have got data with 16000 rows and my last row is 16000, but If I insert a blank row in row 3, the arrow will stop in row 3.
    I mean CRTL+shift +down

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: What does the rows.count expression do

    You have 16000 rows and then OP's code will select a16001 as I said it is something like pressing ctrl + up arrow from cell A1048576

    I did not mentioned "ctrl + shift + down" as myself & OP's code both saying moving towards up side and I believe "ctrl + shift + down" will move the selected range downwards. Hope we are on same page


    Regards,
    DILIPandey
    <click on below * if this helps>

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: What does the rows.count expression do

    DILIPandey,
    Hope we are on same page.
    Yes we are.

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: What does the rows.count expression do



    cheers my friend ... thanks.



    Regards,
    DILIPandey
    <click on below * if this helps>

  9. #9
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: What does the rows.count expression do

    Hi, dilipandey,

    So excel 2003 and earlier will return 65536.
    AFAIR Excel95 and earlier only featured 2^14 rows (16,384), from 97 to 2003 2^16 like stated, from 2007 on 2^20.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  10. #10
    Forum Contributor
    Join Date
    12-12-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2010
    Posts
    448

    Re: What does the rows.count expression do

    I don't understand...This won't work if there are blank rows? It should work because it's looking for last row with data after going to the bottom of the sheet.

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: What does the rows.count expression do

    Amartino44,
    I was trying to make this point:
    Some people equate finding a last row with the key function of CTRL+shift+ down arrow key.
    Last edited by AB33; 06-24-2013 at 01:01 PM.

  12. #12
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: What does the rows.count expression do

    Thanks HaHoBe for sharing the knowledge



    Regards,
    DILIPandey
    <click on below * if this helps>

+ 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