+ Reply to Thread
Results 1 to 11 of 11

How to find the next first blank cell after the last cell used in the column?

  1. #1
    Registered User
    Join Date
    01-13-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    76

    How to find the next first blank cell after the last cell used in the column?

    Hello everyone,

    I know this is an easy code. But the moment i try to use xldown following by offset(1,0) it gives me a runtime error.
    Then I found out the cell has reach to the bottom of worksheet (65535).
    Is there anyway to rewrite the code so I can get "select the next first blank cell after the last cell used in a column" ?


    Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: How to find the next first blank cell after the last cell used in the column?

    Hi If your not blank cell is the last cells (65535 row) then how You want select cell under this?
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: How to find the next first blank cell after the last cell used in the column?

    Does this help:

    Range("A65536").End(xlup).Select

  4. #4
    Forum Contributor
    Join Date
    04-24-2012
    Location
    Karlstad, Sweden
    MS-Off Ver
    Excel 2016
    Posts
    232

    Re: How to find the next first blank cell after the last cell used in the column?

    xldown works if you have not selected the last cell. Following code is more reliable.
    \Joakim
    Please Login or Register  to view this content.
    Last edited by arlu1201; 05-14-2012 at 03:59 AM. Reason: Please put code tags in future.

  5. #5
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: How to find the next first blank cell after the last cell used in the column?

    or this way
    Please Login or Register  to view this content.
    p.s. type something in the very last cell (ex 2007) 1048576 row (the results are strange)

  6. #6
    Registered User
    Join Date
    01-13-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    76

    Re: How to find the next first blank cell after the last cell used in the column?

    Ya, something like this, but how to write the code if I am using "ActiveCell" as a reference?

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: How to find the next first blank cell after the last cell used in the column?

    try..
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  8. #8
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: How to find the next first blank cell after the last cell used in the column?

    try
    Please Login or Register  to view this content.

  9. #9
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: How to find the next first blank cell after the last cell used in the column?

    or
    Please Login or Register  to view this content.

  10. #10
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: How to find the next first blank cell after the last cell used in the column?

    To select last cell in activesheet in A column you can use this code:

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    01-13-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    76

    Re: How to find the next first blank cell after the last cell used in the column?

    yes, these are all i am looking for. Thank you everyone!!! :D

+ 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